summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TClientScriptManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/TClientScriptManager.php')
-rw-r--r--framework/Web/UI/TClientScriptManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php
index cb945fbf..94ef19b6 100644
--- a/framework/Web/UI/TClientScriptManager.php
+++ b/framework/Web/UI/TClientScriptManager.php
@@ -171,8 +171,8 @@ class TClientScriptManager extends TApplicationComponent
*/
public function registerPostBackControl($jsClass,$options)
{
- if(!isset($options['FormID']))
- $options['FormID']=$this->_page->getForm()->getClientID();
+ if(!isset($options['FormID']) && ($form=$this->_page->getForm())!==null)
+ $options['FormID']=$form->getClientID();
$optionString=TJavaScript::encode($options);
$code="new $jsClass($optionString);";