diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 7c94e03e339..b32d4ea938e 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -145,7 +145,7 @@ if ($action == 'add') if ($id > 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $_GET["id"]=$id; // Force chargement page en mode visu @@ -239,7 +239,7 @@ if ($action == 'update') if ($result >= 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7dffd99f8bf..2d6f728b502 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -224,7 +224,7 @@ if (empty($reshook)) $action = 'create'; } else { // Categories association - $contcats = GETPOST( 'contcats', 'array' ); + $contcats = GETPOST( 'contcats', 'array'); $object->setCategories($contcats); } } @@ -383,7 +383,7 @@ if (empty($reshook)) $db->query( $sql ); // Then we add the associated categories - $categories = GETPOST( 'contcats', 'array' ); + $categories = GETPOST( 'contcats', 'array'); $object->setCategories($categories); $object->old_lastname=''; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 54afc80691f..143b375f5b3 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -340,7 +340,7 @@ if (empty($reshook)) if ($id > 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); @@ -444,7 +444,7 @@ if (empty($reshook)) if ($object->update($object->id, $user) > 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $action = 'view'; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 085af055f38..97f9ff41d54 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -187,7 +187,7 @@ if (empty($reshook)) if (! $error && !empty($object->id) > 0) { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $result=$object->setCategories($categories); if ($result<0) { $langs->load("errors"); @@ -282,7 +282,7 @@ if (empty($reshook)) else setEventMessages($object->error, $object->errors, 'errors'); }else { // Category association - $categories = GETPOST('categories'); + $categories = GETPOST('categories', 'array'); $result=$object->setCategories($categories); if ($result < 0) { diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 87db05e5bbe..80d6799e278 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -490,7 +490,7 @@ if (empty($reshook)) } // Customer categories association - $custcats = GETPOST( 'custcats', 'array' ); + $custcats = GETPOST('custcats', 'array'); $object->setCategories($custcats, 'customer'); // Supplier categories association @@ -607,7 +607,7 @@ if (empty($reshook)) } // Customer categories association - $categories = GETPOST( 'custcats', 'array' ); + $categories = GETPOST('custcats', 'array'); $object->setCategories($categories, 'customer'); // Supplier categories association diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a495290f47a..273c71d8e8c 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -260,7 +260,7 @@ if (empty($reshook)) { } if (! empty($conf->categorie->enabled)) { // Categories association - $usercats = GETPOST( 'usercats', 'array' ); + $usercats = GETPOST('usercats', 'array'); $object->setCategories($usercats); } $db->commit(); @@ -478,7 +478,7 @@ if (empty($reshook)) { if (! $error && ! count($object->errors)) { // Then we add the associated categories - $categories = GETPOST( 'usercats', 'array' ); + $categories = GETPOST('usercats', 'array'); $object->setCategories($categories); }