February 29, 2016 at 6:42 AM #17656
Please find the error messages below which I only get in terminal when running any wp cli command
PHP Catchable fatal error: Argument 1 passed to acfw_location_rules() must be of the type array, null given, called in /var/www/docs/wp-content/plugins/acf-widgets/includes/default-widgets.php on line 69 and defined in /var/www/docs/wp-content/plugins/acf-widgets/includes/helper-functions.php on line 13 Catchable fatal error: Argument 1 passed to acfw_location_rules() must be of the type array, null given, called in /var/www/docs/wp-content/plugins/acf-widgets/includes/default-widgets.php on line 69 and defined in /var/www/docs/wp-content/plugins/acf-widgets/includes/helper-functions.php on line 13
Will you be able to assist in this case?
PrzemekFebruary 29, 2016 at 7:36 AM #17663
as a workaround I’ve replaced
$default_widgets = $GLOBALS['acfw_default_widgets'];
in line 67 and 121 of default-widgets.php with the following
$default_widgets = isset( $GLOBALS['acfw_default_widgets'] ) ? $GLOBALS['acfw_default_widgets'] : ;
and for my scenarios it worksFebruary 29, 2016 at 1:37 PM #17664
Hey Przemek! Thanks for pointing this out. Seems like a situation similar to some problems I had with AJAX early on in the lifecycle. I’ll add some extra checks to make sure WordPress is running in the correct context (WP_CLI vs HTTP) and should have a fix push out before the end of this week!
Again, thanks for finding this!March 1, 2016 at 12:30 AM #19637
Great! Thank you for your feedback on it.
Have a great week!
PrzemekMarch 3, 2016 at 9:56 PM #22299
Hey Przemek, this was fixed in the newest version of ACFW (1.7) that I just pushed. The update should be available in your dashboard, or you can force an update check by visiting the “Updates” screen and clicking the “Check Now” button. 🙂
Thanks for your help getting this resolved & thank you again for your support of the plugin! I really do appreciate it! Thanks to you, February was the most successful month ever in ACFW history! I’m so excited that so many people are finding value in my little side project 🙂
Cheers!March 5, 2016 at 1:52 AM #23176
Thank you for fixing it. Your plugin is really usefull. I rarely used widgets before but in my recent project thanks to your plugin which makes them easy to implement I found them extremely useful.
Thanks again 🙂
PrzemekMarch 8, 2016 at 8:47 PM #28720
Closing this thread.
- The topic ‘Errors when running wp cli commands’ is closed to new replies.