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

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

Closed
anonymous-matomo-user opened this issue Jun 6, 2012 · 3 comments
Closed

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

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

Comments

@anonymous-matomo-user
Copy link

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
@mattab
Copy link
Member

mattab commented Jun 17, 2012

Thanks for the report

@mattab
Copy link
Member

mattab commented Jun 19, 2012

It's not fixed, I closed by mistake

@mattab
Copy link
Member

mattab commented Jul 31, 2012

(In [6612]) Fixes #3200

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

2 participants