Help me to understand how buttons now work

Open to all! Ask other shopowners for help.
User avatar
tessthepup
Certified Developer
Posts: 383
Joined: Mon Mar 01, 2021 5:55 pm
Phoenix Version:
Has thanked: 47 times
Been thanked: 62 times

Re: Help me to understand how buttons now work

Post by tessthepup »

I finally managed to make some time to get back to this

Code: Select all

<?= $GLOBALS['Admin']->button(IMAGE_BACK, 'fas fa-angle-left', 'btn btn-secondary', $GLOBALS['Admin']->link('parts_category.php', ['parts_category_id' => $parts_category_id, $getparentquerys => $parent_id]));?>
Please can someone explain why this produces this notice
Warning: Illegal offset type in C:\wamp64\www\partsfinderpro\admin\parts_category.php on line 150
Maybe something to do with

Code: Select all

if(isset($parent_id)&&($parent_id>0)) {
           $getparentquery = tep_db_query("select parent_id from parts_category where parts_category_id = '".$parent_id."'");
           $getparentquerys = tep_db_fetch_array($getparentquery);
The button does work but goes back to far, right back to category id 0 not the previous category :(


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Help me to understand how buttons now work

Post by ecartz »

At a guess, it's saying that $getparentquerys is neither an integer nor a string, as those are the legal offset types.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply