Problem with getMergedAssetHash()


(vitcap) #1

After update to piwik’s 6.4 version I’ve found this error
The merged asset : couldn’t be parsed for getting the hashcode.
The problem was in AssetManager.php
because count in new php version changed behavior
Mine is PHP Version 5.2.13

I’ve posted what I’ve found in php.net


marc at gutt dot it
07-Jun-2010 06:10
There was a change in a PHP5 version. Now an empty string returns 1:

<?php echo count(''); // returns 1 echo count(array()); // returns 0 ?>

This wasn’t in PHP4 and some older PHP5 versions.

I’ve solved in this way, may be the developer can solved in different way
Above

case (1): //row 340

I’ve insert

if(!($matchingFiles)) {
	return false;
}

(Matthieu Aubry) #2

See solution in http://dev.piwik.org/trac/ticket/1493


(vitcap) #3

Thanks