WIP: PHP Error Attempt to read property "name" on bool

Hey,

I found a bug today. Unfortunately I can’t tell if it was already there before, but I migrated the site to a better VPS today. And in Debug I see this error repeated several times in a row:

PHP Warning: attempt to read property “name” on bool in /wp-content/themes/bricks/includes/elements/post-taxonomy.php on line 122

I am using ACF for CPT, Taxonomy and custom fields. Would you know where this problem may be occurring?

Hi,

do you use the “Taxonomy” element? If you do, where do you use it? Post, CPT?

I’ve checked the code, and this could happen, but I just need to figure out under what conditions :slight_smile:

Matej

Yes, I definitely use it in CPT, but I also use it in the archive in the cpt overview.

Hey, I have yet to notice this problem if I start using filters. They work fine, I don’t see any problem, but this is what appears in the log:

PHP Warning: undefined array key “taxonomy” in /wp-content/themes/bricks/includes/query-filters.php on line 1818

Hi @mikes,

I was able to replicate the first one, and I’ve added it to the bug tracker. For the second one, I’m still checking how to reproduce it :slight_smile:

Matej

Great, I’m so glad I helped! I’ll be waiting for the resolution.

Hi @mikes,

actually, we are not sure how to reproduce the second issue locally.

PHP Warning: undefined array key “taxonomy” in /wp-content/themes/bricks/includes/query-filters.php on line 1818

Can you send temporary login credentials to your website and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase, so we can take a look? Please also record a video or write down steps on how to reproduce this second issue.

We could just add a check in the code, but we would like to know how you triggered it.

Thanks!
Matej

Hey Matej,

thanks for the info. I have forwarded your message to our agency team, who deal with these things more often. I hope you will get a response from them soon! :slight_smile:

1 Like