]> git.mxchange.org Git - friendica.git/blobdiff - mod/proxy.php
Merge pull request #3500 from AndyHee/3.5.2rc
[friendica.git] / mod / proxy.php
index bf1e93ccf86f77add9a8fac1f75d04090cb9c2d6..9311e55a96c02e4e6be68b50b323bef4906ba5d3 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 // Based upon "Privacy Image Cache" by Tobias Hößl <https://github.com/CatoTH/>
 
+use Friendica\App;
+
 define('PROXY_DEFAULT_TIME', 86400); // 1 Day
 
 define('PROXY_SIZE_MICRO', 'micro');
@@ -136,6 +138,7 @@ function proxy_init(App $a) {
        }
 
        $valid = true;
+       $r = array();
 
        if (!$direct_cache AND ($cachefile == '')) {
                $r = qu("SELECT * FROM `photo` WHERE `resource-id` = '%s' LIMIT 1", $urlhash);
@@ -146,8 +149,6 @@ function proxy_init(App $a) {
                                $mime = 'image/jpeg';
                        }
                }
-       } else {
-               $r = array();
        }
 
        if (!dbm::is_result($r)) {