Skip to content

Fix JS and PHP >= 7.0 #8

Merged
av3nger merged 2 commits intowpmudev:1.5.4from
gabriel-munteanu:master
Oct 27, 2020
Merged

Fix JS and PHP >= 7.0 #8
av3nger merged 2 commits intowpmudev:1.5.4from
gabriel-munteanu:master

Conversation

@gabriel-munteanu
Copy link
Contributor

Hi,

  1. I did a JS fix recommended by some guy here: https://wordpress.org/support/topic/it-cant-run-let-me-tell-you-how-to-fix-it/
  2. I updated the JS flot plotting library
  3. Someone wrote here https://wordpress.org/support/topic/php-7-compatibility-144/ that the problem with PHP >= 7.0.0 is because of the change in how debug_backtrace works. From my investigations I found that this is not the problem. The actual issue is with declare(ticks=1) ; when you do this it is no longer activated in all included files from now on: https://www.php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.declare-ticks .
    The solution to this is to inject declare(ticks=1) at the beginning of each new file included.

P.S. I added the archive to the commit so I can point people to use it until you merge this pull request and update the plugin in WordPress repo.

Update flot library files
Fix other JavaScript code
Add stream wrapper to inject declare(ticks=1) in all loaded php files
Add check to also disable OPCache if found
Add plugin archive
@av3nger av3nger self-requested a review October 26, 2020 04:48
@av3nger av3nger self-assigned this Oct 26, 2020
@av3nger av3nger changed the base branch from master to 1.5.4 October 27, 2020 00:20
@av3nger av3nger merged commit 242ae98 into wpmudev:1.5.4 Oct 27, 2020
@z3nth10n
Copy link

Didn't work, my wordpress still prints this:

image

So, I can't start the scan.

@av3nger
Copy link

av3nger commented Dec 8, 2020

@z3nth10n , do you have any errors in the browser console?

@rinart73
Copy link

rinart73 commented Dec 31, 2020

For me it completely breaks the site and I get "ERR_CONNECTION_RESET".
Server: Apache + PHP 7.0.
There are no errors in PHP log.
I tried to enable debug mode when starting scan, it did nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants