#12 wrong test for arguments in php3_mcal_list_alarms

closed
5
2003-01-28
2000-01-24
Ron Saad
No

The test for arguments has || expressions. It should say 'if arg !=1 AND getParams fails ... return FAIL'.
Here's a diff:
*** php3_mcal.c.orig Mon Jan 24 01:13:11 2000
--- php3_mcal.c Mon Jan 24 01:43:40 2000
***************
*** 547,554 ****
datetime_t startdate=DT_INIT;
datetime_t enddate=DT_INIT;
myargc=ARG_COUNT(ht);
! if (myargc !=1 || getParameters(ht,myargc,&streamind,&startyear,&startmonth,&startday,&endyear,&endmonth,&endday) == FAILURE) {
! WRONG_PARAM_COUNT;
}

convert_to_long(streamind);
--- 550,560 ----
datetime_t startdate=DT_INIT;
datetime_t enddate=DT_INIT;
myargc=ARG_COUNT(ht);
! if (myargc !=1 ) {
! if (getParameters(ht,myargc,&streamind,&startyear,&startmonth,&startday,
! &endyear,&endmonth,&endday) == FAILURE) {
! WRONG_PARAM_COUNT;
! }
}

convert_to_long(streamind);

Discussion

  • Ron Saad

    Ron Saad - 2000-01-24

    This is a duplicate of 101147 created by hitting \'Refresh\' in the browser.
    It might be nice if the \'submit\' action on this site would
    go to a status window rather than a display of the bug list (which is the same as the first bug list window, but when refreshed will cause another submit ...)

     
  • Robert Allen

    Robert Allen - 2000-02-04
    • assigned_to: nobody --> markie
     
  • Chuck Hagenbuch

    Chuck Hagenbuch - 2003-01-28

    Logged In: YES
    user_id=9307

    No need for this to be open anymore. This is correct in
    PHP4, in any case.

     
  • Chuck Hagenbuch

    Chuck Hagenbuch - 2003-01-28
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks