@@ -350,8 +350,11 @@ public function recurseLiteCategTree($maxDepth = 3, $currentDepth = 0, $idLang =
350
350
*/
351
351
protected function recursiveDelete (&$ toDelete , $ idCategory )
352
352
{
353
- if (!is_array ($ toDelete ) || !$ idCategory ) {
354
- die (Tools::displayError ());
353
+ if (!is_array ($ toDelete )) {
354
+ die (Tools::displayError ('Parameter "toDelete" is invalid. ' ));
355
+ }
356
+ if (!$ idCategory ) {
357
+ die (Tools::displayError ('Parameter "idCategory" is invalid. ' ));
355
358
}
356
359
357
360
$ sql = new DbQuery ();
@@ -614,7 +617,7 @@ public function recalculateLevelDepth($idParentCategory)
614
617
public static function getCategories ($ idLang = false , $ active = true , $ order = true , $ sqlFilter = '' , $ orderBy = '' , $ limit = '' )
615
618
{
616
619
if (!Validate::isBool ($ active )) {
617
- die (Tools::displayError ());
620
+ die (Tools::displayError (' Parameter "active" is invalid. ' ));
618
621
}
619
622
$ result = Db::getInstance (_PS_USE_SQL_SLAVE_ )->executeS (
620
623
'
@@ -684,11 +687,11 @@ public static function getAllCategoriesName(
684
687
$ limit = ''
685
688
) {
686
689
if (isset ($ idRootCategory ) && !Validate::isInt ($ idRootCategory )) {
687
- die (Tools::displayError ());
690
+ die (Tools::displayError (' Parameter "idRootCategory" was provided, but it \' s not a valid integer. ' ));
688
691
}
689
692
690
693
if (!Validate::isBool ($ active )) {
691
- die (Tools::displayError ());
694
+ die (Tools::displayError (' Parameter "active" is invalid. ' ));
692
695
}
693
696
694
697
if (isset ($ groups ) && Group::isFeatureActive () && !is_array ($ groups )) {
@@ -759,11 +762,11 @@ public static function getNestedCategories(
759
762
$ limit = ''
760
763
) {
761
764
if (isset ($ idRootCategory ) && !Validate::isInt ($ idRootCategory )) {
762
- die (Tools::displayError ());
765
+ die (Tools::displayError (' Parameter "idRootCategory" was provided, but it \' s not a valid integer. ' ));
763
766
}
764
767
765
768
if (!Validate::isBool ($ active )) {
766
- die (Tools::displayError ());
769
+ die (Tools::displayError (' Parameter "active" is invalid. ' ));
767
770
}
768
771
769
772
if (isset ($ groups ) && Group::isFeatureActive () && !is_array ($ groups )) {
@@ -1134,7 +1137,7 @@ public static function getRootCategory($idLang = null, Shop $shop = null)
1134
1137
public static function getChildren ($ idParent , $ idLang , $ active = true , $ idShop = false )
1135
1138
{
1136
1139
if (!Validate::isBool ($ active )) {
1137
- die (Tools::displayError ());
1140
+ die (Tools::displayError (' Parameter "active" is invalid. ' ));
1138
1141
}
1139
1142
1140
1143
$ cacheId = 'Category::getChildren_ ' . (int ) $ idParent . '- ' . (int ) $ idLang . '- ' . (bool ) $ active . '- ' . (int ) $ idShop ;
@@ -1170,7 +1173,7 @@ public static function getChildren($idParent, $idLang, $active = true, $idShop =
1170
1173
public static function hasChildren ($ idParent , $ idLang , $ active = true , $ idShop = false )
1171
1174
{
1172
1175
if (!Validate::isBool ($ active )) {
1173
- die (Tools::displayError ());
1176
+ die (Tools::displayError (' Parameter "active" is invalid. ' ));
1174
1177
}
1175
1178
1176
1179
$ cacheId = 'Category::hasChildren_ ' . (int ) $ idParent . '- ' . (int ) $ idLang . '- ' . (bool ) $ active . '- ' . (int ) $ idShop ;
0 commit comments