]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
typo 553/head
authorArthurHoaro <arthur@hoa.ro>
Thu, 5 May 2016 11:28:43 +0000 (13:28 +0200)
committerArthurHoaro <arthur@hoa.ro>
Thu, 5 May 2016 11:28:43 +0000 (13:28 +0200)
application/HttpUtils.php
application/Url.php
tests/Url/UrlTest.php

index 0e1ce8798878e3a8043d581da18e44427914bec8..c84ba6f05746d404b195607715556a67ccce8eba 100644 (file)
@@ -27,7 +27,7 @@
 function get_http_response($url, $timeout = 30, $maxBytes = 4194304)
 {
     $urlObj = new Url($url);
-    $cleanUrl = $urlObj->indToAscii();
+    $cleanUrl = $urlObj->idnToAscii();
 
     if (! filter_var($cleanUrl, FILTER_VALIDATE_URL) || ! $urlObj->isHttp()) {
         return array(array(0 => 'Invalid HTTP Url'), false);
@@ -70,7 +70,7 @@ function get_http_response($url, $timeout = 30, $maxBytes = 4194304)
  * Retrieve HTTP headers, following n redirections (temporary and permanent ones).
  *
  * @param string $url              initial URL to reach.
- * @param int    $redirectionLimit max redirection follow..
+ * @param int    $redirectionLimit max redirection follow.
  *
  * @return array HTTP headers, or false if it failed.
  */
index 61a30a7800972d8d8c22fdad98a4023e1c561b23..77447c8df96635c17f55a90cb463a1313c35170a 100644 (file)
@@ -240,7 +240,7 @@ class Url
      *
      * @return string converted cleaned up URL.
      */
-    public function indToAscii()
+    public function idnToAscii()
     {
         $out = $this->cleanup();
         if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) {
index 5fdc86177bdf9677317719b6f8f516fa5e89f351..ce82265e305bfceec3b69e232002a411f5ea0d67 100644 (file)
@@ -190,10 +190,10 @@ class UrlTest extends PHPUnit_Framework_TestCase
         $ind = 'http://www.académie-française.fr/';
         $expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';
         $url = new Url($ind);
-        $this->assertEquals($expected, $url->indToAscii());
+        $this->assertEquals($expected, $url->idnToAscii());
 
         $notInd = 'http://www.academie-francaise.fr/';
         $url = new Url($notInd);
-        $this->assertEquals($notInd, $url->indToAscii());
+        $this->assertEquals($notInd, $url->idnToAscii());
     }
 }