]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #2198 from rabuzarus/2312_code_cleanup
[friendica.git] / boot.php
index de99e96574804ee61decdb0638f4d88e8507e946..c9c0f73b8686c359c477ffaf9220e57254eb9d31 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1350,7 +1350,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));
        }
 }