From: Michael Vogel Date: Wed, 16 Dec 2015 09:47:26 +0000 (+0100) Subject: Don't generate a guid shorter than 13 characters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ca4be3ded39149d21fa5d61bbc4676968ee79579;p=friendica.git Don't generate a guid shorter than 13 characters --- diff --git a/boot.php b/boot.php index 19cfd71a8a..9f7a1b2f2e 100644 --- a/boot.php +++ b/boot.php @@ -1248,7 +1248,7 @@ function get_guid($size=16, $prefix = "") { $prefix = substr($prefix, 0, $size - 22); return(str_replace(".", "", uniqid($prefix, true))); } else { - $prefix = substr($prefix, 0, $size - 13); + $prefix = substr($prefix, 0, max($size - 13, 0)); return(uniqid($prefix)); } }