@halfdan opened this Issue on September 6th 2010 Member

There's a regression in trunk. Setting up Piwik locally throws an Exception in https://github.com/piwik/piwik/blob/master/core/AssetManager.php#L371. Cause is the static call to ::isGenerated() which itself isn't declared as static.

@julienmoumne commented on September 6th 2010 Member

Thanks. Do you have any idea which php configuration stopped the exception from being raised on my development box ?

@halfdan commented on September 6th 2010 Member

No idea. What setup do you have?

I'm currently using:

  • Win7
  • Apache 2.2.16
  • PHP 5.3.3 + xdebug

Do you have display_errors = On (should be On on a dev. box).

On the other hand - I wonder why removeMergedAsset() gets called in the first place, I'd expect it not to be called when disable_merged_assets = 1 in global.ini.php.

@julienmoumne commented on September 6th 2010 Member

I didn't configure the php strict mode properly. Sorry about that. I will update http://dev.piwik.org/trac/wiki/CodingStandard accordingly.

removeMergedAsset() is always called in development mode (ie. with disable_merged_assets = 1). It ensures merged assets are always regenerated when switching back to production mode (ie. with disable_merged_assets = 0).

@julienmoumne commented on September 6th 2010 Member

In order to see the error, I had to update https://github.com/piwik/piwik/blob/master/config/global.ini.php#L282 to E_ALL | E_STRICT

@julienmoumne commented on September 6th 2010 Member

(In [3072]) fixes #1675

@robocoder commented on September 6th 2010 Contributor

The CI server uses E_ALL | E_STRICT to catch these types of errors.

We should add a note to the appropriate wiki page.

This Issue was closed on December 23rd 2010
Powered by GitHub Issue Mirror