Ticket #1675 (closed Bug: fixed)

Opened 17 months ago

Last modified 14 months ago

Regression in Trunk: AssetManager.php

Reported by: halfdan Owned by: JulienM
Priority: normal Milestone: Piwik 1.1
Component: Core Keywords:
Cc: Sensitive: no

Description

There's a regression in trunk. Setting up Piwik locally throws an Exception in  http://dev.piwik.org/trac/browser/trunk/core/AssetManager.php#L371. Cause is the static call to ::isGenerated() which itself isn't declared as static.

Change History

Changed 17 months ago by JulienM

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

Changed 17 months ago by JulienM

  • owner set to JulienM

Changed 17 months ago by halfdan

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.

Changed 17 months ago by JulienM

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).

Changed 17 months ago by JulienM

In order to see the error, I had to update  http://dev.piwik.org/trac/browser/trunk/config/global.ini.php#L282 to E_ALL | E_STRICT

Changed 17 months ago by JulienM

  • status changed from new to closed
  • resolution set to fixed

(In [3072]) fixes #1675

Changed 17 months ago by vipsoft

  • milestone set to 1.1 - Piwik 1.1

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

We should add a note to the appropriate wiki page.

Changed 14 months ago by matt

  • priority changed from critical to normal
Note: See TracTickets for help on using tickets.