mirror of
https://github.com/friendica/friendica
synced 2025-04-28 16:24:25 +02:00
Add more Strings::isHex() checks to photos
This commit is contained in:
parent
392137b433
commit
4c5dd9f47c
2 changed files with 5 additions and 2 deletions
|
@ -40,7 +40,7 @@ class Strings
|
|||
*/
|
||||
public static function isHex($hexCode)
|
||||
{
|
||||
return @preg_match("/^[a-f0-9]{2,}$/i", $hexCode) && !(strlen($hexCode) & 1);
|
||||
return !empty($hexCode) ? @preg_match("/^[a-f0-9]{2,}$/i", $hexCode) && !(strlen($hexCode) & 1) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue