New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes error when opcache is disabled #23

merged 1 commit into from Jul 26, 2014


None yet
3 participants

amenadiel commented Jul 26, 2014

If you load the gui panel with opcache disabled in php.ini, you get an error

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@time()) at position 0 (@): Unexpected character' in /var/www/opcache/src/OpCacheGUI/OpCache/Status.php:141 Stack trace: #0 /var/www/opcache/src/OpCacheGUI/OpCache/Status.php(141): DateTime->__construct('@time()') #1 /var/www/opcache/template/status.phtml(39): OpCacheGUI\OpCache\Status->getStatsInfo() #2 /var/www/opcache/bootstrap.php(95): require('/var/www/opcach...') #3 /var/www/opcache/public/index.php(3): require('/var/www/opcach...') #4 {main} thrown in /var/www/opcache/src/OpCacheGUI/OpCache/Status.php on line 141

So I added a verification to the getStatsInfo method to fallback to empty stats, displaying the following:



This comment has been minimized.


PeeHaa commented Jul 26, 2014

I love how downvoting your answer on Stack Overflow ended up in a PR :-)

PeeHaa added a commit that referenced this pull request Jul 26, 2014

Merge pull request #23 from amenadiel/master
fixes error when opcache is disabled

@PeeHaa PeeHaa merged commit fc4a7cc into PeeHaa:master Jul 26, 2014


This comment has been minimized.

amenadiel commented Jul 26, 2014


I looked at your profile on S.O. thinking "who's this guy and why does he hate me... oh wait, I'm using opcacheGUI since last week. I never sent this PR". Small world.


This comment has been minimized.

maciejczyzewski commented Jul 26, 2014

Two Smoking Barrels?

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