From: <gem...@li...> - 2012-03-08 10:01:08
|
Revision: 534 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=534&view=rev Author: matijsdejong Date: 2012-03-08 10:01:02 +0000 (Thu, 08 Mar 2012) Log Message: ----------- isset($this->{non existing prop}) causes PHP error Modified Paths: -------------- tags/1.5.1/library/classes/Gems/Project/ProjectSettings.php Modified: tags/1.5.1/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- tags/1.5.1/library/classes/Gems/Project/ProjectSettings.php 2012-03-06 11:51:15 UTC (rev 533) +++ tags/1.5.1/library/classes/Gems/Project/ProjectSettings.php 2012-03-08 10:01:02 UTC (rev 534) @@ -193,7 +193,7 @@ */ public function getAccountDelayFactor() { - if (isset($this->account) && isset($this->account['delayFactor'])) { + if ($this->offsetExists('account') && isset($this->account['delayFactor'])) { return intval($this->account['delayFactor']); } else { return 4; @@ -264,7 +264,7 @@ // MUtil_Echo::track($codes); $rules = array(); - if (isset($this->passwords) && is_array($this->passwords)) { + if ($this->offsetExists('passwords') && is_array($this->passwords)) { $this->_getPasswordRules($this->passwords, $codes, $rules); } @@ -278,7 +278,7 @@ */ public function getSessionTimeOut() { - if (isset($this->session, $this->session['idleTimeout'])) { + if ($this->offsetExists('session') && isset($this->session['idleTimeout'])) { return $this->session['idleTimeout']; } else { return $this->defaultSessionTimeout; @@ -292,7 +292,7 @@ */ public function getSuperAdminName() { - if (isset($this->admin) && isset($this->admin['user'])) { + if ($this->offsetExists('admin') && isset($this->admin['user'])) { return trim($this->admin['user']); } } @@ -304,7 +304,7 @@ */ protected function getSuperAdminPassword() { - if (isset($this->admin) && isset($this->admin['pwd'])) { + if ($this->offsetExists('admin') && isset($this->admin['pwd'])) { return trim($this->admin['pwd']); } } @@ -316,7 +316,7 @@ */ public function getSuperAdminIPRanges() { - if (isset($this->admin['ipRanges'])) { + if ($this->offsetExists('admin') && isset($this->admin['ipRanges'])) { return $this->admin['ipRanges']; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |