Update base.php
This commit is contained in:
parent
adcfbd2e30
commit
a6976d1a56
|
@ -315,6 +315,20 @@ if(!is_fn("check_is_empty")) {
|
|||
}
|
||||
}
|
||||
|
||||
if(!is_fn("get_key_in_array")) {
|
||||
function get_key_in_array($val, $arr) {
|
||||
return array_search($val, $arr);
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_fn("remove_item_in_array")) {
|
||||
function remove_item_in_array($key, $arr) {
|
||||
if(array_key_exists($key, $arr)) {
|
||||
unset($arr[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// error handler (set error)
|
||||
if(!is_fn("set_error")) {
|
||||
function set_error($msg, $code="ERROR") {
|
||||
|
|
Loading…
Reference in New Issue
Block a user