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

Bug fix for preventing the error messages when import data from IIS log #3641

Closed
anonymous-matomo-user opened this issue Dec 25, 2012 · 6 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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

Change

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

to

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

@mattab
Copy link
Member

mattab commented Jan 2, 2013

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

@julienmoumne
Copy link
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
Copy link
Author

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

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.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12.x - Piwik 1.12.x 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