Skip to content
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

Regression in Trunk: AssetManager.php #1675

Closed
halfdan opened this issue Sep 6, 2010 · 6 comments
Closed

Regression in Trunk: AssetManager.php #1675

halfdan opened this issue Sep 6, 2010 · 6 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@halfdan
Copy link
Member

halfdan commented Sep 6, 2010

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
Copy link
Member

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

@halfdan
Copy link
Member Author

halfdan commented Sep 6, 2010

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
Copy link
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
Copy link
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
Copy link
Member

(In [3072]) fixes #1675

@robocoder
Copy link
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.

@halfdan halfdan added this to the Piwik 1.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants