Merge pull request #8934 from annando/fix-fatal

Fix fatal error because of unknown function "fetchUrl"
This commit is contained in:
Hypolite Petovan 2020-07-27 08:11:47 -04:00 committed by GitHub
commit 4fe3b349ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ class System
$previous = ['class' => '', 'function' => '', 'database' => false];
// The ignore list contains all functions that are only wrapper functions
$ignore = ['fetchUrl', 'call_user_func_array'];
$ignore = ['call_user_func_array'];
while ($func = array_pop($trace)) {
if (!empty($func['class'])) {

View File

@ -22,6 +22,7 @@
namespace Friendica\Protocol;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\Strings;
@ -71,7 +72,7 @@ class Salmon
$ret[$x] = substr($ret[$x], 5);
}
} elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
$ret[$x] = DI::httpRequest()->fetchUrl($ret[$x]);
$ret[$x] = DI::httpRequest()->fetch($ret[$x]);
}
}
}