#3200 closed Bug (fixed)

Undefined index in Top Keywords for Page URL (v1.8.2)

Reported by: bestis Owned by:
Priority: normal Milestone: 1.8.3 - Piwik 1.8.3
Component: Core Keywords:
Cc: Sensitive: no

Description

Error is:

Notice: Undefined index: in /var/www/html/plugins/Referers/Controller.php on line 375

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/var/www/html/plugins/Referers/Controller.php:375]
#1 Piwik_Referers_Controller->getKeywordsForPage(...) called at [:]
#2 call_user_func_array(...) called at [/var/www/html/core/FrontController.php:138]
#3 Piwik_FrontController->dispatch(...) called at [/var/www/html/index.php:53]

Code seems to be:

                $request = new Piwik_API_Request($topPageUrlRequest);
                $request = $request->process();
                $tables = $request->getArray();
                $topPageUrls = $tables[key($tables)];
                $topPageUrls = $topPageUrls->getRowsMetadata('url');
                $tmpTopPageUrls = array_values($topPageUrls);
                $topPageUrl = current($tmpTopPageUrls);

Where that $tables[key($tables)] is probably empty and gives that notice and then error log says:

2012-06-06 11:48:57: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Fatal
error:  Call to a member function getRowsMetadata() on a non-object
in /var/www/html/plugins/Referers/Controller.php on line 376

Change History (3)

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

  • Milestone set to 1.8.2 - Piwik 1.8.2
  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the report

comment:2 Changed 22 months ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened

It's not fixed, I closed by mistake

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

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

(In [6612]) Fixes #3200

Note: See TracTickets for help on using tickets.