mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Removing use of ife() from core classes.
This commit is contained in:
parent
213b78727f
commit
81865bc960
2 changed files with 2 additions and 2 deletions
|
@ -844,7 +844,7 @@ class Validation extends Object {
|
|||
$_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 . '*)?' .
|
||||
|
|
|
@ -702,7 +702,7 @@ class JavascriptHelper extends AppHelper {
|
|||
$val = 'null';
|
||||
break;
|
||||
case (is_bool($val)):
|
||||
$val = ife($val, 'true', 'false');
|
||||
$val = !empty($val) ? 'true' : 'false';
|
||||
break;
|
||||
case (is_int($val)):
|
||||
$val = $val;
|
||||
|
|
Loading…
Add table
Reference in a new issue