[horde] Pretty sure I found Bug in Trean (Bookmarks)

Andy Dorman adorman at ironicdesign.com
Mon Oct 7 21:36:27 UTC 2013


On 10/07/2013 04:03 PM, Michael M Slusarz wrote:
> Quoting Andy Dorman <adorman at ironicdesign.com>:
>
>> On 10/07/2013 01:58 PM, Michael M Slusarz wrote:
>>> Quoting Andy Dorman <adorman at ironicdesign.com>:
>>>
>>>> On 10/03/2013 08:32 AM, Andy Dorman wrote:
>>>>> I have tested this fix as well and it works fine...
>>>>>
>>>>>>   public function listBookmarks($sortby = 'title', $sortdir = 0,
>>>>>> $from = 0, $count = 0)
>>>>>>   {
>>>>>>       $values = array($this->_userId);
>>>>>>       $sql = 'SELECT bookmark_id, user_id, bookmark_url,
>>>>>> bookmark_title, bookmark_description, bookmark_clicks,
>>>>>> bookmark_http_status, favicon_url, bookmark_dt
>>>>>>               FROM trean_bookmarks
>>>>>>               WHERE user_id = ?
>>>>>>               ORDER BY bookmark_' . ($sortby ? $sortby : 'title') .
>>>>>> ($sortdir ? ' DESC' : '');
>>>>>>       $sql = $GLOBALS['trean_db']->addLimitOffset($sql,
>>>>>> array('limit' => $count, 'offset' => $from));
>>>>>
>>>>> It still seems silly to me that PHP apparently considers the empty
>>>>> string or whatever is being passed for $sortby to be a valid value and
>>>>> does not invoke the default for it.
>>>
>>> Not silly at all.  This is basic PHP comparison logic - an empty string
>>> is considered a false value for purposes of a boolean comparison.  See:
>>>
>>> http://php.net/manual/en/function.empty.php
>>>
>>> michael
>>>
>>
>> Exactly!  It is so nice to work with PHP experts like yourself.
>>
>> Anyway, I submitted the bug report, #12733, and this proposed fix
>> which is simple, but feels like a bandaid to me.  We have been testing
>> this fix on our beta test site for over a week and it has worked fine.
>>
>> Is there any other action I should take?
>
> Nope.  Trean is a lower priority than other Horde apps, so it may take a
> bit longer for an appropriate developer to examine the ticket.
>

NP, thanks.

-- 
Andy Dorman



More information about the horde mailing list