?
avatar stAn47
stAn47
2 Mar 2017

current code uses @ to suppress the error message, but i would rather suggest to use a faster function which does not produce any internal error messages such as "isset" or "empty". errors caught with @ still get processed by custom and default error handlers and thus it may be much slower in many cases.

original code at line 67:

if ($item && @$item->query['q'] === @$query['q'])

the problem is that this line is reached also from within other extensions, not just the com_finder and thus it would be nice if it was optimized for best performance.

8 Undefined index: q in file: /web/vm2/purity/components/com_finder/router.php line: 67
8 Undefined index: view in file: /web/vm2/purity/components/com_finder/router.php line: 55
8 Undefined index: f in file: /web/vm2/purity/components/com_finder/router.php line: 61

best regards,stan

avatar stAn47 stAn47 - open - 2 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Mar 2017
avatar zero-24
zero-24 - comment - 4 Mar 2017

Closing as there is a PR #14323

avatar zero-24 zero-24 - change - 4 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-04 08:58:42
Closed_By zero-24
avatar zero-24 zero-24 - close - 4 Mar 2017
avatar Hackwar
Hackwar - comment - 4 Mar 2017

I've implemented your code in #14323 Thanks for your contribution.

Add a Comment

Login with GitHub to post a comment