mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +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);
|
$shorthand = trim($shorthand);
|
||||||
|
|
||||||
if (is_numeric($shorthand)) {
|
if (ctype_digit($shorthand)) {
|
||||||
return $shorthand;
|
return (int) $shorthand;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($shorthand === '') {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$last = strtolower($shorthand[strlen($shorthand) - 1]);
|
$last = strtolower($shorthand[strlen($shorthand) - 1]);
|
||||||
|
|
Loading…
Reference in a new issue