• Resolved walmartshopper

    (@walmartshopper)


    WooCommerce fatal-errors log was showing:

    CRITICAL Uncaught Error: Call to undefined function Core\Utils\php_uname() in /var/www/wptbox/wp-content/plugins/woocommerce-square/vendor/apimatic/core/src/Utils/CoreHelper.php:159

    The site is hosted on Namecheap EasyWP which has the php_uname() function disabled.

    This is the only place in the Square plugin that this function gets called. I was able to fix the error by removing the function call and replacing it with a hard-coded text, so line 159 in CoreHelper.php now says:

    return PHP_OS_FAMILY . ‘-5.19.0-1023-aws’;

    I am wondering if the php_uname() function call could be removed from the plugin code. Otherwise I will need to manually edit the file every time I update the plugin, and I imagine other users will have the same issue since this function is disabled on many common hosting providers. Thanks!

Viewing 1 replies (of 1 total)
  • Hi there, sorry for the late reply!

    Thanks for all the information you provided as well as how you addressed it.

    We have an open bug report with the Square developer team regarding this issue from a couple of weeks ago, it’s still being looked at for inclusion in a future release.

    I appreciate your time and hopefully we’ll get this fixed for you soon. Let us know if you have any additional questions!

Viewing 1 replies (of 1 total)

The topic ‘Fatal error when web host has disabled the php_uname() function’ is closed to new replies.