Plugin Directory

Changeset 801569


Ignore:
Timestamp:
11/09/2013 01:59:47 PM (12 years ago)
Author:
shockware
Message:

Correctly cast all integer values to int

Location:
contact-form-7-datepicker/trunk/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-datepicker/trunk/modules/date.php

    r763278 r801569  
    7575        $dpOptions['minDate'] = $tag->get_option('min-date', '', true);
    7676        $dpOptions['maxDate'] = $tag->get_option('max-date', '', true);
    77         $dpOptions['firstDay'] = $tag->get_option('first-day', 'int', true);
     77        $dpOptions['firstDay'] = (int)$tag->get_option('first-day', 'int', true);
    7878        $dpOptions['showAnim'] = $tag->get_option('animate', '', true);
    7979        $dpOptions['yearRange'] = str_replace('-', ':', $tag->get_option('year-range', '', true));
    80         $dpOptions['numberOfMonths'] = $tag->get_option('months', 'int', true);
     80        $dpOptions['numberOfMonths'] = (int)$tag->get_option('months', 'int', true);
    8181
    8282        $dpOptions['showButtonPanel'] = $tag->has_option('buttons');
  • contact-form-7-datepicker/trunk/modules/datetime.php

    r801559 r801569  
    6868        $dpOptions['minDate'] = $tag->get_option('min-date', '', true);
    6969        $dpOptions['maxDate'] = $tag->get_option('max-date', '', true);
    70         $dpOptions['firstDay'] = $tag->get_option('first-day', 'int', true);
     70        $dpOptions['firstDay'] = (int)$tag->get_option('first-day', 'int', true);
    7171        $dpOptions['showAnim'] = $tag->get_option('animate', '', true);
    7272        $dpOptions['yearRange'] = str_replace('-', ':', $tag->get_option('year-range', '', true));
     
    8181        foreach (array('minute', 'hour', 'second') as $s) {
    8282            foreach (array('min', 'max') as $m) {
    83                 $dpOptions[$s . ucfirst($m)] = $tag->get_option("$m-$s", '', true);
     83                $dpOptions[$s . ucfirst($m)] = (int)$tag->get_option("$m-$s", 'int', true);
    8484            }
    8585
    86             $dpOptions['step' . ucfirst($s)] = $tag->get_option("step-$s", '', true);
     86            $dpOptions['step' . ucfirst($s)] = (int)$tag->get_option("step-$s", 'int', true);
    8787        }
    8888
  • contact-form-7-datepicker/trunk/modules/time.php

    r801559 r801569  
    6666        $dpOptions = array();
    6767        $dpOptions['timeFormat'] = str_replace('_', ' ', $tag->get_option('time-format', '', true));
    68         $dpOptions['firstDay'] = $tag->get_option('first-day', 'int', true);
     68        $dpOptions['firstDay'] = (int)$tag->get_option('first-day', 'int', true);
    6969        $dpOptions['showAnim'] = $tag->get_option('animate', '', true);
    7070        $dpOptions['controlType'] = $tag->get_option('control-type', '', true);
     
    7676        foreach (array('minute', 'hour', 'second') as $s) {
    7777            foreach (array('min', 'max') as $m) {
    78                 $dpOptions[$s . ucfirst($m)] = $tag->get_option("$m-$s", '', true);
     78                $dpOptions[$s . ucfirst($m)] = (int)$tag->get_option("$m-$s", 'int', true);
    7979            }
    8080
    81             $dpOptions['step' . ucfirst($s)] = $tag->get_option("step-$s", '', true);
     81            $dpOptions['step' . ucfirst($s)] = (int)$tag->get_option("step-$s", 'int', true);
    8282        }
    8383
Note: See TracChangeset for help on using the changeset viewer.