Jump to content

Error saving packs


Recommended Posts

Hello, community.


Whenever I save a pack, this error shows up:

Warning: array_key_exists(): The first argument should be either a string or an integer in /home/******/public_html/classes/Pack.php on line 49 (this error shows up 3 times, it might be because all our client's packs have 3 products)

Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/classes/Pack.php:49) in /home/******/public_html/classes/Tools.php on line 252


I've searched online for this but I can't seem to find anyone with the same problem or similar.


I don't really have much more details to this. Line 49 has this:

if (!array_key_exists($id_product, self::$cacheIsPack)) {
    $result = Db::getInstance()->getValue('SELECT COUNT(*) FROM `'._DB_PREFIX_.'pack` WHERE id_product_pack = '.(int)$id_product);
    self::$cacheIsPack[$id_product] = ($result > 0);


Some help would be extremely appreciated.

Thanks in advance!

Edited by inovlancer (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...