PHP 7.1 Error in header - X Theme

I’m testing a site for a client to upgrade to PHP version 7.1.7 and there is an error that shows in the header after changing PHP versions.

Warning: A non-numeric value encountered in …/wp-content/themes/x/framework/functions/global/admin/thumbnails/width.php on line 74

Running the latest version of X theme 5.1.1

The site running PHP 5.6 does not have this problem and running 7.0 also does not produce the issue so it’s a fairly recent change that’s causing the issue.

How can we fix this so the site can run on her host’s PHP 7.1.7?

Hi there,

There are some cases that this error may happen in PHP version 7.1.X. This is happening for the cases that default value of the variable is auto, in PHP <7.1 those values were converted to 0 but it is not the case for version 7.1.X.

At the moment kindly fall back to version 7.0.X till we have the official release for 7.1 support. We will inform our development team regarding the case.

Meanwhile, as this is only a Warning and will not affect any functionality of the theme, you can simply turn off warnings in Wordpress:

https://aristath.github.io/blog/wp-hide-php-errors

That way you can keep the PHP version 7.1.7 and use it normally.

Thank you.

Thanks @christopher.amirian, do we have a rough timeline for a release that includes 7.1.X support?

Hi there,

There is no ETA about this. But, this is not an error but just warning, a newly added warning for PHP 7.1. And you can always disable this warning by setting WP_DEBUG to false under your site’s wp-config.php

Thanks!

1 Like