Skip to content

Commit

Permalink
Changing ternary operator usage syntax to be compliant with php 5.2 a…
Browse files Browse the repository at this point in the history
…nd below
  • Loading branch information
ADmad committed Feb 28, 2010
1 parent e0abe99 commit 8dfadaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cake/libs/view/helpers/form.php
Expand Up @@ -909,7 +909,7 @@ function input($fieldName, $options = array()) {
}

$out['input'] = $input;
$format = $format ?: array('before', 'label', 'between', 'input', 'after', 'error');
$format = $format ? $format : array('before', 'label', 'between', 'input', 'after', 'error');
$output = '';
foreach ($format as $element) {
$output .= $out[$element];
Expand Down Expand Up @@ -1227,12 +1227,12 @@ function button($title, $options = array()) {

/**
* Creates a submit button element. This method will generate `<input />` elements that
* can be used to submit, and reset forms by using $options. image submits can be created by supplying an
* can be used to submit, and reset forms by using $options. image submits can be created by supplying an
* image path for $caption.
*
* ### Options
*
* - `div` - Include a wrapping div? Defaults to true. Accepts sub options similar to
* - `div` - Include a wrapping div? Defaults to true. Accepts sub options similar to
* FormHelper::input().
* - `before` - Content to include before the input.
* - `after` - Content to include after the input.
Expand All @@ -1241,7 +1241,7 @@ function button($title, $options = array()) {
*
* ### Options
*
* - `div` - Include a wrapping div? Defaults to true. Accepts sub options similar to
* - `div` - Include a wrapping div? Defaults to true. Accepts sub options similar to
* FormHelper::input().
* - Other attributes will be assigned to the input element.
*
Expand Down

0 comments on commit 8dfadaf

Please sign in to comment.