Macrura Posted January 28, 2019 Share Posted January 28, 2019 PHP Warning: array_key_exists(): The first argument should be either a string or an integer in .../wire/core/Wire.php:954 I'm running an addHookAfter on saveReady to check for changed to some fields, and set some cache fields as a result. But every time a page is saved (usually by a non-superuser), the above warning is generated.. Some of the fields being checked are text, others are table, or page reference... not sure how to troubleshoot this one... Link to comment Share on other sites More sharing options...
BitPoet Posted January 28, 2019 Share Posted January 28, 2019 1 hour ago, Macrura said: Some of the fields being checked are text, others are table, or page reference... not sure how to troubleshoot this one... Perhaps you can use TracyDebugger and output (bd) whatever you pass to isChanged in your hook? 1 Link to comment Share on other sites More sharing options...
Macrura Posted January 29, 2019 Author Share Posted January 29, 2019 tracy didn't help with this, but turned out i was missing a closing parenthesis on one of the dozens of conditions and there was an extra one later, so the api call was triggering the warning, but not any error...?♂️ Link to comment Share on other sites More sharing options...
kongondo Posted January 29, 2019 Share Posted January 29, 2019 6 hours ago, Macrura said: i was missing a closing parenthesis on one of the dozens of conditions Your IDE didn't flag this up? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now