Errors on missing properties
-
Some queries will error out when attempting to access data. Here’s one error message that shows immediately on fresh activation of Yoast and this plugin:
“debugMessage”: “Undefined array key \”bctitle-archive-wpseo\””,
If I add an
isset()
check for that property, it then fails on:$userID = $all['company_or_person_user_id']; $user = get_userdata($userID);
This is because the default value for ‘company_or_person_user_id’ is (seemingly) false, which makes $user false (and later you attempt to access properties off of it).
“Attempt to read property \”user_nicename\” on bool”
Let me know what you think.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Errors on missing properties’ is closed to new replies.