Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing use of ife() from core classes.

  • Loading branch information...
commit 8b419d2dd8b0e2fa4bfa1c3e549aeba5a31c80c1 1 parent 0cc1d84
@markstory markstory authored
View
2  cake/libs/validation.php
@@ -806,7 +806,7 @@ function url($check, $strict = false) {
$_this =& Validation::getInstance();
$_this->check = $check;
$validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=') . '\/0-9a-z]|(%[0-9a-f]{2}))';
- $_this->regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . ife($strict, '', '?') .
+ $_this->regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . (!empty($strict) ? '' : '?') .
'(?:' . $_this->__pattern['ip'] . '|' . $_this->__pattern['hostname'] . ')(?::[1-9][0-9]{0,3})?' .
'(?:\/?|\/' . $validChars . '*)?' .
'(?:\?' . $validChars . '*)?' .
View
2  cake/libs/view/helpers/javascript.php
@@ -678,7 +678,7 @@ function value($val, $quoteStrings = true) {
$val = 'null';
break;
case (is_bool($val)):
- $val = ife($val, 'true', 'false');
+ $val = !empty($val) ? 'true' : 'false';
break;
case (is_int($val)):
$val = $val;
Please sign in to comment.
Something went wrong with that request. Please try again.