diff --git a/resources/functions.php b/resources/functions.php index a8cebede73..b7265a6b9c 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -2194,4 +2194,14 @@ function number_pad($number,$n) { } } -?> \ No newline at end of file +//add alternative array_key_first for older verisons of PHP + if (!function_exists('array_key_first')) { + function array_key_first(array $arr) { + foreach($arr as $key => $unused) { + return $key; + } + return NULL; + } + } + +?>