Fatal error on admin ajax loads
-
Was getting this from the admin-ajax requests on the front end “[11-Aug-2022 14:10:31 UTC] PHP Fatal error: Uncaught Error: Cannot use a scalar value as an array in /files/wp-content/plugins/favorites/app/Entities/Favorite/FavoritesArrayFormatter.php:73”
I noticed $formatted_favorites was set to null so I added this if statement to clear the error (“if(!empty($formatted_favorites)){“). Not sure what the value of $formatted_favorites should be but this seems to suppress the error.
https://gist.github.com/someguy9/084c608860a0e6e5c47595c1b3f49163
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Fatal error on admin ajax loads’ is closed to new replies.