PHP 7.0 breaks inFocus

open (7 posts) (3 voices)

  1. ian

    The site I posted about here - - running inFocus 3.9 & WP 4.7 had its PHP version upgraded by the hosting company yesterday from 5.6 to 7.0 (on their recommendation I should add). I never checked what happened (my bad...) but the client contacted me today to say "site broken"...

    I got the hosters to revert back to 5.6 and the site is now working again. PHP 5.6 has a current EOL of Dec 31 2018 so that gives me 2 years to figure out what to do, providing of course WordPress doesn't break the site with an update in the meantime. :-(

    @OnePressTech - I know you cannot touch inFocus as part of BackStop but have you tested your BS themes on PHP 7.0, and did you find any problems and fix them?

    If there's an MSMY code module you had to fix for PHP 7.0 can you direct me to it and the changes required? With luck, said MSMY code module(s) might be common to inFocus so I can try to apply the same fixes (which I can do as I am the theme purchaser). Might not work / be applicable but worth a shot.

    Posted 9 months ago #
  2. OnePressTech

    You will find the bulk of the changes for WP4.6.1 / PHP7 at the following link:

    Most of the changes were for WP4.6.1 compatibility. The main changes for PHP7 were:

    1) widget classes were not declaring / using a php7 compliant constructor. I adjusted the code to retain php5.4 compliant constructor as well so the software can operate regardless of the php version installed. Constructor order is important if you want to eliminate the php7 warning...php7-compliant constructor first, php5.4 compliant constructor second.

    2) There were a couple of null object instances that needed a null check to catch

    3) $this->$option['type']( $option ); is not parsed the same way in php7 as it was in php5.x. In php7 the equivalent is $this->{$option['type']}( $option ); It is a subtle change but notice the brace brackets.

    Additional changes to get rid of WP4.6.1 warnings can be found here:

    Hope that helps.


    Managing Director
    OnePressTech Pty Ltd

    Posted 9 months ago #
  3. Hi, I posted a couple issues I've experienced in moving to 4.7 here:

    I also wanted to note that since 4.6.x and moving to a new host that requires php7 (or at least they only support and guarantee performance on php7) that just changing the code as noted in #3 above by OnePressTech — the site worked and backend fine.

    However, since 4.7 issues with the WP dashboard in editing posts, skins, and short code generator from MSMY are broken — have you experienced this?

    Posted 9 months ago #
  4. OnePressTech

    I have experienced these bugs and expect they are jQuery issues / conflicts. I have been experiencing your bug #2 (can't switch from Visual to text mode) since 4.6.1 on PHP5.4.

    I have scheduled to analyse / fix jQuery issues in the V1.0.2 version of BackStop Themes due to be released in January.

    NOTE: Regarding switch from MSMW-->BackStop Theme V1.0.1...I recommend caution. I found a glitch in the MSMW --> BackStop theme replacement process that may muck up the contents of the last widget in the widget list. Ensure you have a backup and can restore it if you have switch-over issues. I'll be looking to fix that in the V1.0.2 release after Christmas. If you just manually apply the fixes I made at the link I provided above to your current MSMW theme you won't experience any negative issues as MacMyDay has independently verified. The widget overwrite glitch only occurs if you load and enable a backstop theme then switch back to the previous MSMW theme.

    Posted 9 months ago #
  5. OnePressTech

    Bump to get past spam

    Posted 3 weeks ago #
  6. OnePressTech

    Bump to get past spam

    Posted 2 weeks ago #
  7. OnePressTech

    Bump to get past spam

    Posted 15 hours ago #


You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme