From: Joey Schulze Date: Wed, 3 Mar 2010 12:41:49 +0000 (+0100) Subject: Don't need the array key but a value X-Git-Tag: 2010-06-02_customer~151 X-Git-Url: https://git.infodrom.org/?p=misc%2Fkostenrechnung;a=commitdiff_plain;h=6cb7368c716e6b279b4aad6ed86c1d220c697c7a;ds=sidebyside Don't need the array key but a value --- diff --git a/ajax/ajax.php b/ajax/ajax.php index 5f2e3c9..41ecb87 100644 --- a/ajax/ajax.php +++ b/ajax/ajax.php @@ -212,7 +212,7 @@ function set_variable($name,$mask) if (!array_key_exists('variables',$mask)) return array('error' => 'Unknown variable ' . htmlspecialchars($_POST['name'])); - if (!array_key_exists($_POST['name'],$mask['variables'])) + if (!in_array($_POST['name'],$mask['variables'])) return array('error' => 'Unknown variable ' . htmlspecialchars($_POST['name'])); $_SESSION[$name . '.' . $_POST['name']] = $_POST['value'];