mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:40:15 +00:00
Fix Util Strings
This commit is contained in:
parent
020d1f6e30
commit
3cd098bfc7
1 changed files with 6 additions and 2 deletions
|
@ -530,8 +530,12 @@ class Strings
|
|||
{
|
||||
$shorthand = trim($shorthand);
|
||||
|
||||
if (is_numeric($shorthand)) {
|
||||
return $shorthand;
|
||||
if (ctype_digit($shorthand)) {
|
||||
return (int) $shorthand;
|
||||
}
|
||||
|
||||
if ($shorthand === '') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$last = strtolower($shorthand[strlen($shorthand) - 1]);
|
||||
|
|
Loading…
Reference in a new issue