[geeklog-devel] E_ALL / E_STRICT

Joe Mucchiello joe at ThrowingDice.com
Sun Aug 19 03:38:16 EDT 2007


At 03:17 AM 8/19/2007, Dirk Haun wrote:
>Joe Mucchiello wrote:
>
> >error_reporting( E_ALL );
>
>To quote myself from April (missing from the mailing list archives, alas):
>
> >Some day, Geeklog should work with E_ALL by default (or rather, without
> >the need for that error_reporting() statement). We're not that far off,
> >actually. There are only some pesky issues with unchecked checkboxes
> >that are tedious to code around ...
>
>Try saving a story to see what I mean ...

Took 10 minutes to fix.

line 1312 of 1.4.1 /admin/story.php
     $expire_hour = COM_applyFilter (isset($_POST['expire_hour']) ? 
$_POST['expire_hour'] : '', true);
     if (isset ($_CONF['hour_mode']) && ($_CONF['hour_mode'] == 24)) {
         if ($expire_hour >= 12) {
             if ($expire_hour > 12) {
                 $expire_hour -= 12;
             }
             $expire_ampm = 'pm';
         } else {
             if ($expire_hour == 0) {
                 $expire_hour = 12;
             }
             $expire_ampm = 'am';
         }
     } else {
         $expire_ampm = COM_applyFilter (isset($_POST['expire_ampm']) 
? $_POST['expire_ampm'] : '');
     }
     $expire_minute = COM_applyFilter (isset($_POST['expire_minute']) 
? $_POST['expire_minute'] : '', true);
     $expire_second = COM_applyFilter (isset($_POST['expire_second']) 
? $_POST['expire_second'] : '', true);
     $expire_year = COM_applyFilter (isset($_POST['expire_year']) ? 
$_POST['expire_year'] : '', true);
     $expire_month = COM_applyFilter (isset($_POST['expire_month']) ? 
$_POST['expire_month'] : '', true);
     $expire_day = COM_applyFilter (isset($_POST['expire_day']) ? 
$_POST['expire_day'] : '', true);

line 1353
     submitstory ($type, COM_applyFilter ($_POST['sid']), $uid,
                  COM_applyFilter ($_POST['tid']),
                  COM_stripslashes ($_POST['title']),
                  COM_stripslashes ($_POST['introtext']),
                  COM_stripslashes ($_POST['bodytext']),
                  COM_applyFilter ($_POST['hits'], true), $unixdate, 
$expiredate,
                  COM_applyFilter ($_POST['featured'], true),
                  COM_applyFilter ($_POST['commentcode'], true),
                  COM_applyFilter ($_POST['trackbackcode'], true),
                  COM_applyFilter (isset($_POST['statuscode']) ? 
$_POST['statuscode'] : '', true),
                  trim(COM_applyFilter ($_POST['postmode'])),
                  COM_applyFilter (isset($_POST['frontpage']) ? 
$_POST['frontpage'] : '', true),
                  COM_applyFilter (isset($_POST['draft_flag']) ? 
$_POST['draft_flag'] : ''),
                  COM_applyFilter ($_POST['numemails'], true),
                  COM_applyFilter ($_POST['owner_id'], true),
                  COM_applyFilter ($_POST['group_id'], true),
                  $_POST['perm_owner'], $_POST['perm_group'],
                  $_POST['perm_members'], $_POST['perm_anon'], 
isset($_POST['delete']) ? $_POST['delete'] : Array(),
                  COM_applyFilter (isset($_POST['show_topic_icon']) ? 
$_POST['show_topic_icon'] : ''),
                  COM_applyFilter ($_POST['old_sid']));

isset and ? : are tedious. But taking 10 minutes to add them isn't 
that onerous.

----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com 




More information about the geeklog-devel mailing list