Please use x() correctly:
<?php
if (x($someArray, 'element')) {
// Do something
}
?>
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
3d595c4dcc
commit
5bc2ebb267
3 changed files with 38 additions and 33 deletions
|
|
@ -2017,22 +2017,22 @@ function admin_page_features_post(App $a) {
|
|||
$features = get_features(false);
|
||||
|
||||
foreach ($features as $fname => $fdata) {
|
||||
foreach (array_slice($fdata,1) as $f) {
|
||||
foreach (array_slice($fdata, 1) as $f) {
|
||||
$feature = $f[0];
|
||||
$feature_state = 'feature_'.$feature;
|
||||
$featurelock = 'featurelock_'.$feature;
|
||||
$feature_state = 'feature_' . $feature;
|
||||
$featurelock = 'featurelock_' . $feature;
|
||||
|
||||
if (x($_POST[$feature_state])) {
|
||||
$val = intval($_POST['feature_'.$feature]);
|
||||
if (x($_POST, $feature_state)) {
|
||||
$val = intval($_POST[$feature_state]);
|
||||
} else {
|
||||
$val = 0;
|
||||
}
|
||||
set_config('feature',$feature,$val);
|
||||
|
||||
if (x($_POST[$featurelock])) {
|
||||
set_config('feature_lock',$feature,$val);
|
||||
if (x($_POST, $featurelock)) {
|
||||
set_config('feature_lock', $feature, $val);
|
||||
} else {
|
||||
del_config('feature_lock',$feature);
|
||||
del_config('feature_lock', $feature);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue