diff options
author | knut <> | 2008-07-30 01:43:12 +0000 |
---|---|---|
committer | knut <> | 2008-07-30 01:43:12 +0000 |
commit | 411fbb72f5a4c72e43af08ee403c79c73eb4b53f (patch) | |
tree | 3915b0d98ca3c0608b56ad280cb08b8837a43dea /framework/Web | |
parent | d15b608ef693c8dbc92c3a5f5ae826ca2812a61f (diff) |
fixed #890
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); |