0

I am getting such debug logs

2014-07-22 11:42:17 Notice: Notice (8): Undefined index:  pass in [/htdocs/lib/Cake/View/Helper/PaginatorHelper.php, line 111]
Trace:
PaginatorHelper::beforeRender() - CORE/Cake/View/Helper/PaginatorHelper.php, line 111
ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 130
HelperCollection::trigger() - CORE/Cake/View/HelperCollection.php, line 153
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 245
View::render() - CORE/Cake/View/View.php, line 462
Controller::render() - CORE/Cake/Controller/Controller.php, line 938
ExceptionRenderer::_outputMessage() - CORE/Cake/Error/ExceptionRenderer.php, line 263
ExceptionRenderer::error400() - CORE/Cake/Error/ExceptionRenderer.php, line 209
ExceptionRenderer::render() - CORE/Cake/Error/ExceptionRenderer.php, line 165
ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 127
[main] - [internal], line ??

I have no idea, how to find the source of this error? What can I do to find it out?

Another entry in error log regarding the paginator is this:

2014-07-22 12:39:30 Warning: Warning (2): array_merge() [<a href='http://php.net/function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in [/htdocs/lib/Cake/View/Helper/PaginatorHelper.php, line 111]
Trace:
array_merge - [internal], line ??
PaginatorHelper::beforeRender() - CORE/Cake/View/Helper/PaginatorHelper.php, line 111
ObjectCollection::trigger() - CORE/Cake/Utility/ObjectCollection.php, line 130
HelperCollection::trigger() - CORE/Cake/View/HelperCollection.php, line 153
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE/Cake/Event/CakeEventManager.php, line 245
View::render() - CORE/Cake/View/View.php, line 462
Controller::render() - CORE/Cake/Controller/Controller.php, line 938
ExceptionRenderer::_outputMessage() - CORE/Cake/Error/ExceptionRenderer.php, line 263
ExceptionRenderer::error400() - CORE/Cake/Error/ExceptionRenderer.php, line 209
ExceptionRenderer::render() - CORE/Cake/Error/ExceptionRenderer.php, line 165
ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 127
[main] - [internal], line ??

Another question:

2014-07-22 12:22:03 Error: [MissingControllerException] Controller class ImgController could not be found.
#0 /htdocs/app/webroot/index.php(99): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}

Sometimes, people type in the funniest things into the browsers address bar which result in a MissingControllerException in the log files.

What is best practice in such cases? Ignore and delete such logs?

1 Answer 1

1

Check the source

The first step should be to look at the source code to check what the code is actually trying to do.

$this->options['url'] = array_merge($this->request->params['pass'], $this->request->params['named']);

So it seems that somehow you've managed to unset CakeRequest::$params['pass'] and possibly also CakeRequest::$params['named']. By default they are empty arrays and also stay as that until they have to be populated with something.

Maybe you have some weird routing going on, or maybe you're even tampering with with CakeRequest::$params somewhere in your code, or you've stumbled over a bug, who knows, it's virtually impossible to tell from here.

Ignoring errors?

As for the missing controller exception, it depends of course by what it's actually caused, which again is impossible to tell from here - maybe if you'd show the complete log entry, but then again we still don't know anything about your apps internals, so...

You'll have to figure out the actual cause, and then you can decide what to do. If it's just a misspelled URL, then you can of course just ignore it, or even delete these entries in case you don't want them to clutter the log, and/or you don't want to wait for the rotate and remove functionality to kick in.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much for your answer! After updating the cake version and going from php5.2 to 5.5 most of the above error logs went away - puhh :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.