Skip to content

Commit

Permalink
Fix ini_set calls to use strings as second parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hoffmann committed Jun 19, 2017
1 parent 1ec80bd commit 09a18a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Console/ShellDispatcher.php
Expand Up @@ -142,9 +142,9 @@ protected function _initEnvironment()
}

if (function_exists('ini_set')) {
ini_set('html_errors', false);
ini_set('implicit_flush', true);
ini_set('max_execution_time', 0);
ini_set('html_errors', '0');
ini_set('implicit_flush', '1');
ini_set('max_execution_time', '0');
}

$this->shiftArgs();
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Configure.php
Expand Up @@ -96,7 +96,7 @@ public static function write($config, $value = null)
static::$_hasIniSet = function_exists('ini_set');
}
if (static::$_hasIniSet) {
ini_set('display_errors', $config['debug'] ? 1 : 0);
ini_set('display_errors', $config['debug'] ? '1' : '0');
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Network/Session/DatabaseSessionTest.php
Expand Up @@ -154,7 +154,7 @@ public function testGc()
{
TableRegistry::clear();

ini_set('session.gc_maxlifetime', 0);
ini_set('session.gc_maxlifetime', '0');
$storage = new DatabaseSession();
$storage->write('foo', 'Some value');

Expand Down

0 comments on commit 09a18a7

Please sign in to comment.