mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
add alternative array_key_first for older verisons of PHP
This commit is contained in:
@@ -2194,4 +2194,14 @@ function number_pad($number,$n) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
//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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user