@anonymous-matomo-user opened this Issue on December 25th 2012

When I am using the python script to import the iis log, the error message will show up as below:

Strict Notice: Only variables should be passed by reference in D:\Web\PHP\Piwik\core\Common.php on line 105 
@anonymous-matomo-user commented on December 25th 2012

Change

return str_replace($prefixTable, '', $table, $count = 1);

to

$count = 1;
return str_replace($prefixTable, '', $table, $count);
@mattab commented on January 2nd 2013 Member

(In [7710]) Fixes #3641 Thanks for the patch mihui!

@julienmoumne commented on January 2nd 2013 Member

Should we globally stop using this form of method parameter documentation?

If yes, I suggest this form (or some variant):

return str_replace(
    $prefixTable, 
    '', 
    $table,
    1 // count
);
@anonymous-matomo-user commented on January 3rd 2013

Replying to JulienM:

Should we globally stop using this form of method parameter documentation?

If yes, I suggest this form (or some variant):

return str_replace(
    $prefixTable, 
    '', 
    $table,
    1 // count
);

Not sure, you might be right for the form, but you must put variable there. :)

@julienmoumne commented on January 14th 2013 Member

Replying to mihui:

Not sure, you might be right for the form, but you must put variable there. :)

Have a look at the complete function code. This variable is not used elsewhere.

@anonymous-matomo-user commented on January 15th 2013

Replying to JulienM:

Replying to mihui:

Not sure, you might be right for the form, but you must put variable there. :)

Have a look at the complete function code. This variable is not used elsewhere.

Yeah, you are right. :), just not sure why they put it there.
But you can't just put a CONST there since it is using the reference of a variable.

This Issue was closed on January 15th 2013
Powered by GitHub Issue Mirror