surjit / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

split() should be replaced with explode() #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The split() function http://php.net/split is deprecated as of PHP 5.3.  It 
should be replaced with 
explode().  The patch is:

Index: OAuth.php
===========================================================
========
--- OAuth.php   (revision 1131)
+++ OAuth.php   (working copy)
@@ -717,11 +717,11 @@
   public static function parse_parameters( $input ) {
     if (!isset($input) || !$input) return array();

-    $pairs = split('&', $input);
+    $pairs = explode('&', $input);

     $parsed_parameters = array();
     foreach ($pairs as $pair) {
-      $split = split('=', $pair, 2);
+      $split = explode('=', $pair, 2);
       $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
       $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';

Original issue reported on code.google.com by ithinkihaveacat on 5 Oct 2009 at 8:56

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1163.

Original comment by morten.f...@gmail.com on 5 Jan 2010 at 11:33