Commit 94c1e34ad5c30db6b5c94e6a3f5781489b4090b4

Authored by kevin_fourie
1 parent a22e7a07

Merged in from DEV trunk...

KTS-2861
"KTUtil::arrayGet see "0" as an empty string"
Fixed. Removed isset in favour of manual 0 and '0' checking.

Committed By: Kevin Fourie
Reviewed By: Conrad Vermeulen

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8151 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 1 additions and 2 deletions
lib/util/ktutil.inc
@@ -230,8 +230,7 @@ class KTUtil { @@ -230,8 +230,7 @@ class KTUtil {
230 $aArray = (array) $aArray; 230 $aArray = (array) $aArray;
231 } 231 }
232 232
233 - // Evaluates to false if $aArray is not set or if it has zero length (ie. it's first character is not set).  
234 - if (!isset($aArray{0})) { 233 + if ($aArray !== 0 && $aArray !== '0' && empty($aArray)) {
235 return $mDefault; 234 return $mDefault;
236 } 235 }
237 if (array_key_exists($sKey, $aArray)) { 236 if (array_key_exists($sKey, $aArray)) {