Opened 18 months ago

Closed 18 months ago

Last modified 17 months ago

#3523 closed Bug (fixed)

import_logs.py triggering "Warning: urldecode() expects parameter 1 to be string, array given in core/Tracker/Action.php on line 974"

Reported by: Cyril Owned by:
Priority: normal Milestone:
Component: Core Keywords:
Cc: Sensitive: no

Description

And import_logs fails because of this PHP warning (as it makes sure the response is a GIF file).

Using Piwik 1.9.1. To reproduce:

curl http://localhost/piwik.php --data '{"requests": [{"apiv": "1", "cdt": "2012-10-10 15:15:52", "urlref": "", "dp": "1", "url": "http://example.org/?s[]=foo", "cip": "127.0.0.1", "idsite": 42, "rec": "1", "bots": "1", "ua": ""}], "token_auth": "foo"}'

See the URL? The '[]' is triggering the bug. Removing it makes the bug go away.

Sure, I can hide PHP warnings, but it would be nice to handle this properly as we cannot expect our users to hide warnings.

Change History (4)

comment:1 Changed 18 months ago by matt (mattab)

  • Resolution set to worksforme
  • Status changed from new to closed

Can you please try with latest beta (which is morestable than 1.9.1): http://builds.piwik.org/piwik-1.9.2-b3.zip

I cant reproduce this bug with latest beta but if you still can let me know or re-open the ticket.

comment:2 Changed 18 months ago by Cyril (cbay)

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Yes, I can reproduce it with 1.9.3-b3:

<b>Warning</b>: urldecode() expects parameter 1 to be string, array given in <b>/data/www/piwik2/core/Tracker/Action.php</b> on line <b>977</b>

comment:3 Changed 18 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [7411]) Fixes #3523 Please confirm the fix works for you! I couldnt reproduce the warning for some reasons

comment:4 Changed 17 months ago by Cyril (cbay)

It is indeed fixed.

Note: See TracTickets for help on using tickets.