From 8a58971e4f9fec9e17a1817de7949326681d8de4 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 8 Apr 2016 11:02:26 +0200 Subject: Possible fix for #585 --- HISTORY | 1 + framework/Data/SqlMap/Statements/TMappedStatement.php | 1 - framework/TComponent.php | 5 ++++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index ea1c8892..3679f27f 100644 --- a/HISTORY +++ b/HISTORY @@ -4,6 +4,7 @@ BUG: Issue #540 - Fix TActiveFileUpload on IE11 (ctrlaltca) BUG: Issue #574 - Fix TActiveCustomValidator validation after error (ctrlaltca) BUG: Issue #581 - TActiveFileUpload loses track of LocalName for a moment (emkael) BUG: Issue #582 - Prado autoloader breaks class_exists conditionals (ctrlaltca) +BUG: Issue #585 - Calling unserialize() on TMappedStatement throws TApplicationException (emkael) BUG: TJuiAutoComplete: fix parsing of suggestions (ctrlaltca) BUG: Fix callback for controls with PostState=false (ctrlaltca) BUG: Fix stopping even propagation on javascript events (ctrlaltca) diff --git a/framework/Data/SqlMap/Statements/TMappedStatement.php b/framework/Data/SqlMap/Statements/TMappedStatement.php index 0883564f..abade1b2 100644 --- a/framework/Data/SqlMap/Statements/TMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TMappedStatement.php @@ -919,7 +919,6 @@ class TMappedStatement extends TComponent implements IMappedStatement public function __wakeup() { - parent::__wakeup(); if (is_null($this->_selectQueue)) $this->_selectQueue = array(); } diff --git a/framework/TComponent.php b/framework/TComponent.php index 127b68a3..0752d04c 100644 --- a/framework/TComponent.php +++ b/framework/TComponent.php @@ -555,7 +555,10 @@ class TComponent return isset($args[0])?$args[0]:null; } - throw new TApplicationException('component_method_undefined',get_class($this),$method); + // don't thrown an exception for __magicMethods() or any other weird methods natively implemented by php + if (!method_exists($this, $method)) { + throw new TApplicationException('component_method_undefined',get_class($this),$method); + } } -- cgit v1.2.3