ACF Widgets › Support › Priority Support › Errors when running wp cli commands
Tagged: wp-cli
- This topic has 6 replies, 2 voices, and was last updated 6 years, 4 months ago by
Daron Spence.
-
AuthorPosts
-
February 29, 2016 at 6:42 AM #17656
Przemek Cichoń
ParticipantHi Daron,
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?
Thanks,
PrzemekFebruary 29, 2016 at 7:36 AM #17663Przemek Cichoń
Participantas 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 works
February 29, 2016 at 1:37 PM #17664Daron Spence
KeymasterHey 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 #19637Przemek Cichoń
ParticipantHey Daron,
Great! Thank you for your feedback on it.
Have a great week!
regards,
PrzemekMarch 3, 2016 at 9:56 PM #22299Daron Spence
KeymasterHey 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 #23176Przemek Cichoń
ParticipantHey Daron,
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 🙂
Best regards,
PrzemekMarch 8, 2016 at 8:47 PM #28720Daron Spence
KeymasterClosing this thread.
-
AuthorPosts
- The topic ‘Errors when running wp cli commands’ is closed to new replies.