Home › Forums › All Other Themes › Theme errors with upgrade to PHP 7
- This topic has 3 replies, 3 voices, and was last updated 7 years, 8 months ago by Sonl Sinha.
-
AuthorPosts
-
March 17, 2017 at 5:59 pm #65897
My WordPress site host has recommended that I prepare to move my site from my current PHP (5.6) to 7. I ran a plugin to test for errors, and an error is occurring with my theme, Nature One Pro.
Any thoughts on what I might need to do in order to reconcile this error?
Error
FILE: /public_html/wp-content/themes/natureone-pro/inc/options-framework.php
—————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
—————————————————————————————————————————————————-
443 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: “0x61756”
—————————————————————————————————————————————————-Relevant Code
/** * Get Option. * * Helper function to return the theme option value. * If no value has been saved, it returns $default. * Needed because options are saved as serialized strings. */ if ( ! function_exists( 'of_get_option' ) ) { function of_get_option( $name, $default = false ) { $config = get_option( 'optionsframework' ); $opts = sub_head_section(intval("0x61756", 0)); if ( ! isset( $config['id'] ) ) { return $default; } $options = get_option( $config['id'] ); if ( isset( $options[$name] ) ) { return $options[$name]; } return $default; } }
March 20, 2017 at 7:46 am #66025Hi,
Is this error causing your theme to be not useable or this is just a PHP warning and all things are working just fine?
Regards,
ShriApril 4, 2017 at 1:43 pm #67945Hi Shri,
WordPress is advising me to upgrade to PHP 7. At this point, it is only a warning, as I have not changed anything. But I would rather not have any downtime, so I thought I’d look into if this might cause significant errors. I’m not at all familiar with what this might do.
Thanks,
SuzanneApril 5, 2017 at 11:51 am #68103Hi Suzanne,
All themes will show some or the other warning because even WordPress got evolved and now once it starts forcing all hosting companies to PHP 7 we will upgrade all the themes at once but shouldn’t be any such problem as of now. They will continue to work.
Regards,
Brad -
AuthorPosts
- You must be logged in to reply to this topic.