]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #2197 from annando/1512-ostatus-comment
[friendica.git] / boot.php
index bd2bee3ab8ece34587c855d1b5c010602ec9ade6..506a10571ed22aa052e67ab198a65ecb5aff2f43 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1251,7 +1251,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));
        }
 }