Merge pull request #6342 from annando/notices

Warning and notice fixed
2022.09-rc
Hypolite Petovan 2018-12-29 12:16:37 -05:00 zatwierdzone przez GitHub
commit 166b8ad440
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -180,7 +180,9 @@ class HTML
$xpath = new DomXPath($doc);
$list = $xpath->query("//pre");
foreach ($list as $node) {
$node->nodeValue = str_replace("\n", "\r", $node->nodeValue);
// Ensure to escape unescaped & - they will otherwise raise a warning
$safe_value = preg_replace('/&(?!\w+;)/', '&', $node->nodeValue);
$node->nodeValue = str_replace("\n", "\r", $safe_value);
}
$message = $doc->saveHTML();

Wyświetl plik

@ -329,6 +329,11 @@ class Processor
return;
}
if (empty($object['id'])) {
Logger::log('Activity ' . $url . ' has got not id, aborting. ' . json_encode($object));
return;
}
$activity = [];
$activity['@context'] = $object['@context'];
unset($object['@context']);