Commit 0e72a4e5eac2aaf804564406d56bfd915f27cc4f
1 parent
612eee9d
handle a minor edge-case relating to KTUtil and certain
PHP versions & error settings. Bug number unknown. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5996 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
lib/util/ktutil.inc
| @@ -96,6 +96,9 @@ class KTUtil { | @@ -96,6 +96,9 @@ class KTUtil { | ||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | function arrayGet($aArray, $sKey, $mDefault = null, $bDefaultIfEmpty = true) { | 98 | function arrayGet($aArray, $sKey, $mDefault = null, $bDefaultIfEmpty = true) { |
| 99 | + if (!is_array($aArray)) { | ||
| 100 | + $aArray = (array) $aArray; | ||
| 101 | + } | ||
| 99 | if (empty($aArray)) { | 102 | if (empty($aArray)) { |
| 100 | return $mDefault; | 103 | return $mDefault; |
| 101 | } | 104 | } |