[SUCS Devel] site r705 - trunk/lib
Thomas Lake
tswsl1989 at sucs.org
Tue May 5 10:33:15 BST 2015
On 05/05/15 10:06, Tim Clark wrote:
> There is no advantage to this change, it makes it less clear and relying
> on type juggling to always do as intended is risky and not recommended.
While I would say that the type juggling isn't an issue here ($number is
already an integer at this point courtesy of an earlier call to
intval()), it's definitely less clear than it was before.
Considering both versions are legal and function identically, I really
don't see why this was committed to begin with. Unless people are trying
to inflate the number of commits they're responsible for.
- Tom
>
> On 01/05/2015 23:08, andy at sucs.org wrote:
>> Author: andy
>> Date: 2015-05-01 23:08:04 +0100 (Fri, 01 May 2015)
>> New Revision: 705
>>
>> Modified:
>> trunk/lib/banana-admin.php
>> Log:
>> Removed unnecessary comparison operator
>>
>> Modified: trunk/lib/banana-admin.php
>> ===================================================================
>> --- trunk/lib/banana-admin.php 2015-05-01 21:51:44 UTC (rev 704)
>> +++ trunk/lib/banana-admin.php 2015-05-01 22:08:04 UTC (rev 705)
>> @@ -28,7 +28,7 @@
>>
>> $why = $_POST['why'];
>>
>> - if ( (abs($number) <= $maxbanana ) && $number <> 0 ){
>> + if ( (abs($number) <= $maxbanana ) && $number ){
>>
>> $DB->Query("INSERT INTO awards (username, score, whn, who, why) VALUES (?,?,NOW(),?,?)", array($who, $number, $session->username, $why));
>> header("Location: " . $_SERVER['PHP_SELF']);
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.sucs.org
>> http://lists.sucs.org/mailman/listinfo/devel
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.sucs.org
> http://lists.sucs.org/mailman/listinfo/devel
>
More information about the Devel
mailing list