You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running WooCommerce 2.6.13 under WP 2.7.1 or 2.7.2 on XAMPP Apache/PHP7 under Win7, getting error:
preg_match(): null byte in regex in wp-includes\functions.php on line 5163
Getting it on all sites running WooCommerce; stripped down to just WC running with twentyseventeen theme, issue persists. Disable WooCommerce, error disappears.
However, from what I can determine, doesn't seem to be an issue on remote server; nginx running PHP 5.6.
RESULT OF BACKTRACE:
It looks like the core function with the issue is wp_is_stream(). Here's a debug_backtrace of the call stack:
#0 wp_is_stream() called at [C:\xampplite\htdocs\mysite\wp-includes\functions.php:1600]
#1 wp_mkdir_p() called at [C:\xampplite\htdocs\mysite\wp-includes\functions.php:1900]
#2 wp_upload_dir() called at [C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php:178]
#3 WooCommerce->define_constants() called at [C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php:152]
#4 WooCommerce->__construct() called at [C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php:116]
#5 WooCommerce::instance() called at [C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php:551]
#6 WC() called at [C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php:555]
#7 include_once(C:\xampplite\htdocs\mysite\wp-content\plugins\woocommerce\woocommerce.php) called at [C:\xampplite\htdocs\mysite\wp-settings.php:304]
#8 require_once(C:\xampplite\htdocs\mysite\wp-settings.php) called at [C:\xampplite\htdocs\mysite\wp-config.php:142]
#9 require_once(C:\xampplite\htdocs\mysite\wp-config.php) called at [C:\xampplite\htdocs\mysite\wp-load.php:37]
#10 require_once(C:\xampplite\htdocs\mysite\wp-load.php) called at [C:\xampplite\htdocs\mysite\wp-admin\admin.php:31]
#11 require_once(C:\xampplite\htdocs\mysite\wp-admin\admin.php) called at [C:\xampplite\htdocs\mysite\wp-admin\plugins.php:10]
Edit:
having looked into it some more with the information from that call stack, it looks like the issue is directly within the define_constants() function - specifically, if I comment out these two lines:
I'm closing this, as it's not a WooCommerce issue but one with the core that WC just happens to trigger when it sets its constants. I have found a fix for the issue which currently requires editing a WP core file. Details can be found here:
EXPLANATION OF THE ISSUE
Running WooCommerce
2.6.13
under WP2.7.1
or2.7.2
on XAMPP Apache/PHP7 under Win7, getting error:preg_match(): null byte in regex in wp-includes\functions.php on line 5163
Getting it on all sites running WooCommerce; stripped down to just WC running with twentyseventeen theme, issue persists. Disable WooCommerce, error disappears.
However, from what I can determine, doesn't seem to be an issue on remote server; nginx running PHP 5.6.
RESULT OF BACKTRACE:
It looks like the core function with the issue is
wp_is_stream()
. Here's adebug_backtrace
of the call stack:Edit:
having looked into it some more with the information from that call stack, it looks like the issue is directly within the
define_constants()
function - specifically, if I comment out these two lines:...the error disappears.
Edit 2:
I've whittled this down to just the call on
wp_upload_dir()
- seems to be a core issue. I've submitted a Trac ticket: https://core.trac.wordpress.org/ticket/39722#ticketSYSTEM STATUS REPORT
The text was updated successfully, but these errors were encountered: