Development

#3583 (Form Helper input_date_range_tag range[from] and [to] are not optional)

You must first sign up to be able to contribute.

Ticket #3583 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

Form Helper input_date_range_tag range[from] and [to] are not optional

Reported by: FabianLange Assigned to: fabien
Priority: minor Milestone: 1.0.17
Component: other Version: 1.0.16
Keywords: Cc:
Qualification: Accepted

Description

the PHPdoc says:

 * <b>Examples:</b>
 * <code>
 *  $date = array('from' => '2006-05-15', 'to' => '2006-06-15');
 *  echo input_date_range_tag('date', $date, array('rich' => true));
 * </code>
 *
 * <code>
 *  echo input_date_range_tag('date', null, array('middle' => ' through ', 'rich' => true));
 * </code>

however:

  return $before.
         input_date_tag($name.'[from]', $value['from'], $options).
         $middle.
         input_date_tag($name.'[to]', $value['to'], $options).
         $after;

requires value to have a from and to index. Either fix the doc or preffered make the tag work with value being null/the indexes not being present.

Change History

05/19/08 20:12:49 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

(In [9054]) 1.0: fixed notice when either from or to option in date range tag was not set. fixes #3583

05/19/08 20:13:58 changed by FabianLange

(In [9055]) 1.1: fixed notice when either from or to option in date range tag was not set. fixes #3583

05/19/08 20:15:24 changed by FabianLange

  • qualification changed from Design decision to Accepted.
  • milestone set to 1.0.17.

added some issets to prevent the notice. not that passing "null" doesn't trigger the notice but array('to'=>'a_date') does, which imho is perfectly acceptable