? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
2 Mar 2014

If you send an empty DB query (thus strlen($query) = 0) you get a division by 0. With this little change, the string length is always at least 1. Since this is onyl to roughly guess if a query is good or bad, changing the result of this by +1 doesn't have a real impact. This will also mean, that these queries get a high value and show up as bad. And I think we can all agree that an empty query is simply a waste of perfectly good CPU cycles. ;-)

This is a replacement for PR #1539 by @elinw Thank you!

Tracker item is here: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32441&start=0

avatar Hackwar Hackwar - open - 2 Mar 2014
avatar beat
beat - comment - 2 Mar 2014

Easy no brainer. Sounds good to go @Hackwar :+1: Thanks!

avatar Hackwar
Hackwar - comment - 2 Mar 2014

Please mark your test in the tracker item.

avatar infograf768 infograf768 - change - 24 Mar 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-03-24 09:28:32
avatar infograf768 infograf768 - change - 24 Mar 2014
Title
Fix divison by 0 issue in debug plugin
[#32441] Fix divison by 0 issue in debug plugin
avatar infograf768 infograf768 - close - 24 Mar 2014
avatar infograf768 infograf768 - reference | - 24 Mar 14
avatar infograf768 infograf768 - merge - 24 Mar 2014
avatar infograf768 infograf768 - close - 24 Mar 2014
avatar Hackwar Hackwar - change - 24 Mar 2014
Title
Fix divison by 0 issue in debug plugin
[#32441] Fix divison by 0 issue in debug plugin
avatar Bakual Bakual - reference | bffa9b2 - 12 May 14
avatar Hackwar Hackwar - head_ref_deleted - 6 Jan 2016

Add a Comment

Login with GitHub to post a comment