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
Change
return str_replace($prefixTable, '', $table, $count = 1);
to
$count = 1;
return str_replace($prefixTable, '', $table, $count);
(In [7710]) Fixes #3641 Thanks for the patch mihui!
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
);
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. :)
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.
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.