From: <var...@us...> - 2009-06-06 16:07:27
|
Revision: 6904 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6904&view=rev Author: vargenau Date: 2009-06-06 16:07:23 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Avoid "PHP Fatal error" in PHP5: test type Modified Paths: -------------- trunk/lib/WikiUserNew.php Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2009-06-06 10:07:24 UTC (rev 6903) +++ trunk/lib/WikiUserNew.php 2009-06-06 16:07:23 UTC (rev 6904) @@ -815,14 +815,16 @@ // COOKIE_EXPIRATION_DAYS, COOKIE_DOMAIN); } } - $packed = $prefs->store(); - $unpacked = $prefs->unpack($packed); - if (count($unpacked)) { - foreach (array('_method','_select','_update','_insert') as $param) { - if (!empty($this->_prefs->{$param})) - $prefs->{$param} = $this->_prefs->{$param}; + if (is_object($prefs)) { + $packed = $prefs->store(); + $unpacked = $prefs->unpack($packed); + if (count($unpacked)) { + foreach (array('_method','_select','_update','_insert') as $param) { + if (!empty($this->_prefs->{$param})) + $prefs->{$param} = $this->_prefs->{$param}; + } + $this->_prefs = $prefs; } - $this->_prefs = $prefs; } return $updated; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |