]> git.mxchange.org Git - friendica.git/commitdiff
PHP7 needs an integer value for the length
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 28 Jul 2016 06:59:16 +0000 (08:59 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Thu, 28 Jul 2016 06:59:16 +0000 (08:59 +0200)
library/asn1.php

index e84398bf6207e2ff67aebe363cc34b742902b63c..ac14a5b16f3790110aea92ef829e201ac192c4d7 100644 (file)
@@ -4,6 +4,7 @@
 // Attribution: http://www.krisbailey.com
 // license: unknown
 // modified: Mike Macgrivin mike@macgirvin.com 6-oct-2010 to support Salmon auto-discovery
+// modified: Tobias Diekershoff 28-jul-2016 adding an intval in line 162 to make PHP7 happy
 // from openssl public keys
 
 
@@ -159,7 +160,7 @@ class ASN_BASE {
                                        }
                                        $length = $tempLength;
                                }
-                               $data = substr($string, $p, $length);
+                               $data = substr($string, $p, intval($length));
                                $parsed[] = self::parseASNData($type, $data, $level, $maxLevels);
                                $p = $p + $length;
                        }