Commit c710971d authored by Dries's avatar Dries
Browse files

- Patch #546390 by cweagans: fix CLI detection in install.php

parent ae1d9c57
......@@ -1696,7 +1696,7 @@ function install_configure_form_submit($form, &$form_state) {
// file to be included by command line scripts so that it can be used as an
// API. It should be removed after the API functions in this file have been
// moved out to a separate, reusable location.
if (realpath($_SERVER['SCRIPT_FILENAME']) == __FILE__) {
if (php_sapi_name() != 'cli' && !empty($_SERVER['REMOTE_ADDR'])) {
// Start the installer.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment