viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
Filename | |
---|---|
src/models/SearchverticalsModel.php |
diff --git a/src/models/SearchverticalsModel.php b/src/models/SearchverticalsModel.php index 15af3da55..3a25c6ba6 100644 --- a/src/models/SearchverticalsModel.php +++ b/src/models/SearchverticalsModel.php @@ -144,6 +144,8 @@ class SearchverticalsModel extends GroupModel * the url or host of the url has already been hashed so don't want * to hash it again. * @return array [int, int] that corresponds to the hash of the input + * to keep postgres happy (no unsigned ints) we make the value + * of this function signed */ public function hashIntPair($input, $compute_hash = true) { @@ -152,8 +154,8 @@ class SearchverticalsModel extends GroupModel } else { $hash = $input; } - $front = abs(L\unpackInt(substr($hash, 0, 4))); - $back = abs(L\unpackInt(substr($hash, 4, 4))); + $front = abs(L\unpackInt(substr($hash, 0, 4))) - 2147483648; + $back = abs(L\unpackInt(substr($hash, 4, 4))) - 2147483648; return [$front, $back]; } /**