Browse Source

Change divideInt64ToInt32 to static (#3436)

divideInt64ToInt32 is called statically from protobuf/php/src/Google/Protobuf/Internal/CodedOutputStream.php
(the only reference)
This causes fatal error in PHP 7.1 (32-bit only because 64-bit doesn't use this function)
Tony Wong 8 years ago
parent
commit
be73938d72
1 changed files with 1 additions and 1 deletions
  1. 1 1
      php/src/Google/Protobuf/Internal/GPBUtil.php

+ 1 - 1
php/src/Google/Protobuf/Internal/GPBUtil.php

@@ -38,7 +38,7 @@ use Google\Protobuf\Internal\MapField;
 
 
 class GPBUtil
 class GPBUtil
 {
 {
-    public function divideInt64ToInt32($value, &$high, &$low, $trim = false)
+    public static function divideInt64ToInt32($value, &$high, &$low, $trim = false)
     {
     {
         $isNeg = (bccomp($value, 0) < 0);
         $isNeg = (bccomp($value, 0) < 0);
         if ($isNeg) {
         if ($isNeg) {