Skip to content

Commit 0c39ffa

Browse files
committed
🔨 refactor required() method
Signed-off-by: otengkwame <[email protected]>
1 parent 8ca13fa commit 0c39ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodeIgniter/Framework/libraries/Form_validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ public function required($str = '')
11711171
{
11721172
return is_array($str)
11731173
? (empty($str) === false)
1174-
: (isset($str) ? trim($str) !== '' : false);
1174+
: (trim((string) $str) !== '');
11751175
}
11761176

11771177
// --------------------------------------------------------------------

0 commit comments

Comments
 (0)