Incompatibility with PHP 7.1 for PRO theme

Hello,

I am having this incompatibility with PHP 7.1 for PRO theme.

Would you plz verify!

Hi @tarekr,

Thanks for writing in.

You could follow this thread below in regards to this concern.

Hope it helps.

Let us know how it goes.

Thanks.

I am having this update all the time. When i check it indicates incompatibility of PRO.
I have the latest word press release.

There is a incompatibility issues with X PRO.

Those are the errors with PHP 7,1| How can i revert back to PHP 7.0?
Name: Pro

FILE: /home/tarekrab/public_html/wp-content/themes/pro/framework/functions/global/admin/customizer/preloader.php

FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE

1 | WARNING | File has mixed line endings; this may cause incorrect results

FILE: /home/tarekrab/public_html/wp-content/themes/pro/framework/functions/global/admin/customizer/transients.php

FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE

1 | WARNING | File has mixed line endings; this may cause incorrect results

FILE: /home/tarekrab/public_html/wp-content/themes/pro/woocommerce/cart/cross-sells.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

FILE: /home/tarekrab/public_html/wp-content/themes/pro/woocommerce/single-product/related.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

FILE: /home/tarekrab/public_html/wp-content/themes/pro/woocommerce/single-product/up-sells.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

Name: Pro – Child Theme

PHP 7.1 compatible.

Name: Slider Revolution

PHP 7.1 compatible.

Name: Yoast SEO

PHP 7.1 compatible.

Hello there,

Thanks for updating in!

The warnings you see could be due to incompatibilites between your PHP version and the functions used on those Woocomerce PHP files. However, these warnings can also be reiterated once you switch back to version 7.0. For now, I advise you change the PHP version first in your Siteground cPanel. Here’s a guide to help you do this:

Once done, please get back to us with the list of the report in SG Optimizer > PHP Config.

Just for your information, there is no X Pro, only there is X and there is Pro. The two are separate products.

Thank you.

thx.
I revert back to version 7.0.29
i am still seeing the update symbol needed on wordpress panel.
while i check on Wordpress admin panel it is still stuck on version 7.1,

After contacting sitegroung they provide me with this error::
/home/tarekrab/public_html/wp-content/themes/pro/woocommerce/single-product/related.php
Another problem on toolset type
Siteground has no solution for the WOOCOMMERCE issue and the answer is:
“The plugin is not stuck, it is simply saying that the PHP scripts cannot be upgraded to 7.1 version or anything higher than 5.6”
“Marin K.: I have checked , and from what I see the files do not support 7.0 or any higher than 5.6 so it will be set to that , I am sure that this will not pose any problem to your website , in terms of speed since they are only two files”

Another PHP checker gives me this result for PRO:
FILE: /home/tarekrab/public_html/wp-content/themes/pro/framework/functions/global/admin/customizer/preloader.php

FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE

1 | WARNING | File has mixed line endings; this may cause incorrect results

FILE: /home/tarekrab/public_html/wp-content/themes/pro/framework/functions/global/admin/customizer/transients.php

FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE

1 | WARNING | File has mixed line endings; this may cause incorrect results

This is the only errors i am having on my website caused by PRO theme.

Hi there,

It’s true that Using a call-time pass-by-reference is deprecated since 5.3, but that’s for pass-by-reference during the function call. Do the tools just scan the presence of &$? Or the error is actually trigged by PHP? But yes, pass by reference is completely unsupported by 7.0 which means, your Woocommerce plugin is incompatible too since the theme’s woocommerce template are from that plugin, just enhanced.

The line responsible for that is this

setup_postdata( $GLOBALS['post'] =& $post_object );

And it’s present even on Woocommerce plugin

\woocommerce\templates\single-product\related.php

We update our theme’s woocommerce templates based on those existing templates. Once they release updates then we should follow.

As for 1 | WARNING | File has mixed line endings; this may cause incorrect results, could you try providing the content of this file /home/tarekrab/public_html/wp-content/themes/pro/framework/functions/global/admin/customizer/transients.php ? It usually related to special characters like \r \t \n (hidden lines). And it happens because of the way the files are installed which is host specific. I checked my files and there are no multiple lines.

Thanks!

<?php // ============================================================================= // FUNCTIONS/GLOBAL/ADMIN/CUSTOMIZER/TRANSIENTS.PHP // ----------------------------------------------------------------------------- // Sets transients on various Customizer actions. // ============================================================================= // ============================================================================= // TABLE OF CONTENTS // ----------------------------------------------------------------------------- // 01. Before Customizer Save // 02. After Customizer Save // ============================================================================= // Before Customizer Save // ============================================================================= function x_customizer_set_transients_before_save() { set_transient( 'x_portfolio_slug_before', x_get_option( 'x_custom_portfolio_slug' ), 60 ); } add_action( 'customize_save', 'x_customizer_set_transients_before_save' ); add_action( 'cs_theme_options_before_save', 'x_customizer_set_transients_before_save' ); // After Customizer Save // ============================================================================= function x_customizer_set_transients_after_save() { set_transient( 'x_portfolio_slug_after', x_get_option( 'x_custom_portfolio_slug' ), 60 ); } add_action( 'customize_save_after', 'x_customizer_set_transients_after_save' ); add_action( 'cs_theme_options_after_save', 'x_customizer_set_transients_after_save' );

Hi there,

The latest warning that you have mentioned will not stop the normal function of the theme and the WordPress, it is merely a PHP Warning. Please consider that there is a difference between warning and error, the error is what can cause problems, but the warnings are the recommendations that it is better to do it this/that way.

Now regarding the file in question, it must be some difference between the hosting service provider OS and your OS as the difference is the character code of the enter/return (Carriage Return) in different operating systems.

You can use the link below to download my version of the file and upload it to your server via FTP:
https://we.tl/eOijd4PyN2

But in general, you can simply ignore that message.

Thank you.

OK I uploaded the transient file but i still have 2 warning on PHP 7.0 and 3 errors on PHP 7.1

Do you recommend in this case to ignore the warning and keep the PHP 7.0 instead of PHP 7.1?
If i keep 7.0 i will have warning from siteground that this is not the recommended version for PHP.

What is your recommendation?

Hi, I’m having a similar issue. I recently migrated to Siteground and they recommend PHP 7.1, but when PHP Config checked on compatibility, this error was generated:

FILE: /home/trave841/public_html/elainecolandrea/wp-content/themes/x/woocommerce/single-product/up-sells.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

FILE: /home/trave841/public_html/elainecolandrea/wp-content/themes/x/woocommerce/single-product/related.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

FILE: /home/trave841/public_html/elainecolandrea/wp-content/themes/x/woocommerce/cart/cross-sells.php

FOUND 1 ERROR AFFECTING 1 LINE

26 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4

1 Like

Hi there,

I still remember the false positive result from their tools too about the use of /e in our theme. Which isn’t actually an /e, as they only checks the presence of it in the code. It could be /echo/, and so on.

Please ignore it for now and you may use 7.0 or 7.1 (don’t use 7.2 as themes and other plugins are still or not yet compatible).

Other hosts doesn’t have any issues with it and they relies on the error reported by PHP itself and not from the tools that only scans the content.

Thanks!

1 Like

OK,
I switched to PHP 7.0 and i still have errors.

I experienced a problem while trying to restore a previous version of the main page. The problem was when i press restore the page wordpress is restoring a post in my website and not the page.
I don’t know if this problem is due to incompatibility.

Thx for your help

.

Hi there,

That is a completely different matter that needs to be contacted with your hosting service provider. The restore Previous Version feature is the core functionality of the WordPress and not related to our theme.

As my colleague mentioned you can ignore the warnings and use the theme. Do not rely on the reporting tool of the hosting service provider. If every thing is working ok then there is no problem.

Thank you for your understanding.

Hi there,

When you will issue an update for the PRO to become compatible with PHP 7.1?
This is not comfortable to have my host recommendation for PHP 7.1 while i am running a Theme on PHP 7.0 having warnings.

Rgds

Hi there,

As I and my colleagues mentioned the warnings you get is not the real ones and the difference between the OS carriage returns is not presented and the Tool that your hosting service uses gives a false alert.

The errors you experienced are all related to the Woocommerce plugin files which we override in the theme. We will not be able to change those unless the Woocommerce decide to change. After that we will also change the files in the theme.

So please consider that a new version will not do any changes regarding the messages you get from the hosting service provider.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.