]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Tools.class.php
Merge pull request #974 from jbfavre/fix_ftrss_call_can_break_import
[github/wallabag/wallabag.git] / inc / poche / Tools.class.php
index 93ec3fc6a877bf93f00e7c0dfadfd2cdf2b412d8..7ccfc069b16bb5094be623003198f5f7ecbabd10 100755 (executable)
@@ -51,6 +51,7 @@ final class Tools
 
         $serverport = (!isset($_SERVER["SERVER_PORT"])
             || $_SERVER["SERVER_PORT"] == '80'
+            || $_SERVER["SERVER_PORT"] == HTTP_PORT
             || ($https && $_SERVER["SERVER_PORT"] == '443')
             || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
             ? '' : ':' . $_SERVER["SERVER_PORT"]);
@@ -116,7 +117,7 @@ final class Tools
     {
         $views = array(
             'install', 'import', 'export', 'config', 'tags',
-            'edit-tags', 'view', 'login', 'error'
+            'edit-tags', 'view', 'login', 'error', 'about'
             );
 
         return (in_array($view, $views) ? $view . '.twig' : 'home.twig');
@@ -341,7 +342,10 @@ final class Tools
             return $json;
         };
 
-        $json = $scope("inc/3rdparty/makefulltextfeed.php", array("url" => $url));
+       // Silence $scope function to avoid
+       // issues with FTRSS when error_reporting is to high
+       // FTRSS generates PHP warnings which break output
+        $json = @$scope("inc/3rdparty/makefulltextfeed.php", array("url" => $url));
 
         // Clearing and restoring context
         foreach ($GLOBALS as $key => $value) {