mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02: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…
Add table
Add a link
Reference in a new issue