converting ini_get statements to use strict comparisons where loose comparisons were used

correcting zlib comparison to expect ini_get to return a string, rather than a boolean.


git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7768 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
AD7six 2008-10-21 12:15:28 +00:00
parent a629da67b7
commit f32e557e9c
2 changed files with 4 additions and 4 deletions

View file

@ -299,7 +299,7 @@ class Dispatcher extends Object {
if (isset($_POST)) {
$params['form'] = $_POST;
if (ini_get('magic_quotes_gpc') == 1) {
if (ini_get('magic_quotes_gpc') === '1') {
$params['form'] = stripslashes_deep($params['form']);
}
if (env('HTTP_X_HTTP_METHOD_OVERRIDE')) {
@ -328,7 +328,7 @@ class Dispatcher extends Object {
}
if (isset($_GET)) {
if (ini_get('magic_quotes_gpc') == 1) {
if (ini_get('magic_quotes_gpc') === '1') {
$url = stripslashes_deep($_GET);
} else {
$url = $_GET;
@ -648,7 +648,7 @@ class Dispatcher extends Object {
}
if ($isAsset === true) {
$ob = @ini_get("zlib.output_compression") !== true && extension_loaded("zlib") && (strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false);
$ob = @ini_get("zlib.output_compression") !== '1' && extension_loaded("zlib") && (strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false);
if ($ob && Configure::read('Asset.compress')) {
ob_start();

View file

@ -407,7 +407,7 @@ class Router extends Object {
$out = array('pass' => array(), 'named' => array());
$r = $ext = null;
if (ini_get('magic_quotes_gpc') == 1) {
if (ini_get('magic_quotes_gpc') === '1') {
$url = stripslashes_deep($url);
}