Skip to content

Commit 3cff753

Browse files
author
Ivan Voskoboynyk
committed
PHP built-in webserver compatibility
`sf_cli` should be `false` when running with PHP built-in webserver (PHP_SAPI == "cli-server"). It is a web-environment, not CLI, though it is initiated with CLI command.
1 parent 50923db commit 3cff753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/config/sfApplicationConfiguration.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function setRootDir($rootDir)
288288
'sf_app' => $this->getApplication(),
289289
'sf_environment' => $this->getEnvironment(),
290290
'sf_debug' => $this->isDebug(),
291-
'sf_cli' => 0 === strncasecmp(PHP_SAPI, 'cli', 3)
291+
'sf_cli' => PHP_SAPI === 'cli',
292292
));
293293

294294
$this->setAppDir(sfConfig::get('sf_apps_dir').DIRECTORY_SEPARATOR.$this->getApplication());

0 commit comments

Comments
 (0)