Treat undefined keys as NULL
This commit is contained in:
parent
5916ad47d1
commit
6c4a15b429
1 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,7 @@ if ( ! function_exists('js_config'))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = $js_config[$key];
|
$value = $js_config[$key] ?? NULL;
|
||||||
|
|
||||||
return $value ?? $default;
|
return $value ?? $default;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ if ( ! function_exists('page_vars'))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = $page_vars[$key];
|
$value = $page_vars[$key] ?? NULL;
|
||||||
|
|
||||||
return $value ?? $default;
|
return $value ?? $default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue