PHP 8+ error
-
Hi, I ran into a few issues generating meta data that appear to be exclusive to PHP 8 and above. The issue is that in some places
call_user_func_array
is called, the array passed as parameters have non-numeric keys. But since PHP 8, those keys are passed as named parameters, throwing a fatal error when passed to the numberBetween function.I was able to solve this in a pinch on my local install by wrapping the arguments parameter with “array_values”, I modified the following locations:
FakerPress\Provider\WP_Meta.php:26
FakerPress\Provider\WP_Meta.php:56
I saw in other spots in the plugin usingcall_user_func_array
that you’ve already made this change, so I’m guessing just those two spots got missed. Thanks very much for your hard work building and supporting this very valuable plugin.
- The topic ‘PHP 8+ error’ is closed to new replies.