mirror of
https://github.com/friendica/friendica
synced 2025-04-29 09:04:24 +02:00
Merge remote-tracking branch 'upstream/develop' into channel-relay
This commit is contained in:
commit
7a13d8b8ac
63 changed files with 621 additions and 512 deletions
|
@ -263,7 +263,7 @@ class ErrorHandler
|
|||
public function handleError(int $code, string $message, string $file = '', int $line = 0, ?array $context = []): bool
|
||||
{
|
||||
if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries
|
||||
|
|
|
@ -234,7 +234,7 @@ class Search
|
|||
$p = $page > 1 ? 'p=' . $page : '';
|
||||
$curlResult = DI::httpClient()->get(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), HttpClientAccept::JSON);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$searchResult = json_decode($curlResult->getBody(), true);
|
||||
$searchResult = json_decode($curlResult->getBodyString(), true);
|
||||
if (!empty($searchResult['profiles'])) {
|
||||
// Converting Directory Search results into contact-looking records
|
||||
$return = array_map(function ($result) {
|
||||
|
|
|
@ -70,12 +70,12 @@ class ExternalResource implements ICanReadFromStorage
|
|||
}
|
||||
if (!empty($fetchResult) && $fetchResult->isSuccess()) {
|
||||
$this->logger->debug('Got picture', ['Content-Type' => $fetchResult->getHeader('Content-Type'), 'uid' => $data->uid, 'url' => $data->url]);
|
||||
return $fetchResult->getBody();
|
||||
return $fetchResult->getBodyString();
|
||||
} else {
|
||||
if (empty($fetchResult)) {
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference));
|
||||
} else {
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $fetchResult->getReturnCode(), new Exception($fetchResult->getBody()));
|
||||
throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $fetchResult->getReturnCode(), new Exception($fetchResult->getBodyString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ class System
|
|||
* @param int $offset How many calls to shave off the top of the stack, for example if
|
||||
* this is called from a centralized method that isn't relevant to the callstack
|
||||
* @param bool $full If enabled, the callstack is not compacted
|
||||
* @param array $exclude
|
||||
* @param array $exclude
|
||||
* @return string
|
||||
*/
|
||||
public static function callstack(int $depth = 4, int $offset = 0, bool $full = false, array $exclude = []): string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue