Skip to content

Commit 0614085

Browse files
committed
revert image helper to older version. fat free web curl based version creates memory exhausted error
1 parent fb06a71 commit 0614085

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Version 2.8-SNAPSHOT
5454
* new Polish translation (thanks a lot to Piotr Dymacz)
5555
* improved Expires section and Compression in .htaccess (thanks a lot to S Anand)
5656
* make api item listing, tags and sources stats accessible for non loggedin users in public mode
57-
* replace file_get_content for icon fetching with curl based version for prevent allow_url_fopen problems
5857
* update fat free php framework version 3.0.8
5958
* new configuration parameter for default readability api key
6059
* new configuration parameter for allowing unauthorized access for the update job

helpers/Image.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public function fetchFavicon($url, $isHtmlUrl=false, $width=false, $height=false
3838
$urlElements = parse_url($url);
3939

4040
// search on base page for <link rel="shortcut icon" url...
41-
$html = @\Web::instance()->request($url);
42-
$html = isset($html['body']) ? $html['body'] : "";
41+
$html = @file_get_contents($url);
4342
$shortcutIcon = $this->parseShortcutIcon($html);
4443
if($shortcutIcon!==false) {
4544
if(substr($shortcutIcon,0,4)!='http') {
@@ -82,8 +81,7 @@ public function fetchFavicon($url, $isHtmlUrl=false, $width=false, $height=false
8281
*/
8382
public function loadImage($url, $width=false, $height=false) {
8483
// load image
85-
$data = @\Web::instance()->request($url);
86-
$data = isset($data['body']) ? $data['body'] : false;
84+
$data = @file_get_contents($url);
8785
if($data===false)
8886
return false;
8987

@@ -170,4 +168,4 @@ private function parseShortcutIcon($html) {
170168

171169
return false;
172170
}
173-
}
171+
}

0 commit comments

Comments
 (0)