diff options
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 4 | ||||
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php index d26d243a..9524076c 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -208,7 +208,7 @@ class TJavaScript */
public static function jsonEncode($value)
{
- if(is_null(self::$_json))
+ if(self::$_json === null)
self::$_json = Prado::createComponent('System.Web.Javascripts.TJSON');
return self::$_json->encode($value);
}
@@ -221,7 +221,7 @@ class TJavaScript */
public static function jsonDecode($value)
{
- if(is_null(self::$_json))
+ if(self::$_json === null)
self::$_json = Prado::createComponent('System.Web.Javascripts.TJSON');
return self::$_json->decode($value);
}
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 6d4775bf..3a51bf76 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -115,7 +115,7 @@ class TClientScriptManager extends TApplicationComponent { if(!isset($this->_registeredPradoScripts[$name])) { - if(is_null(self::$_pradoScripts)) + if(self::$_pradoScripts === null) { $packageFile = Prado::getFrameworkPath().DIRECTORY_SEPARATOR.self::SCRIPT_PATH.'/packages.php'; list($packages,$deps)= include($packageFile); @@ -207,8 +207,9 @@ class TClientScriptManager extends TApplicationComponent $assets = Prado::getApplication()->getAssetManager(); if(strpos($base, $assets->getBaseUrl())===false) { - if(!is_null($dir = Prado::getPathOfNameSpace($base))) + if(($dir = Prado::getPathOfNameSpace($base)) !== null) { $base = $dir; + } return array($assets->getPublishedPath($base), $assets->publishFilePath($base)); } else @@ -259,7 +260,9 @@ class TClientScriptManager extends TApplicationComponent */ public function registerPostBackControl($class,$options) { - if(is_null($class)) return; + if($class === null) { + return; + } if(!isset($options['FormID']) && ($form=$this->_page->getForm())!==null) $options['FormID']=$form->getClientID(); $optionString=TJavaScript::encode($options); |