- First commit to issue fork.
- @sidharth_soman opened merge request.
- Status changed to Needs review
over 1 year ago 4:43pm 6 August 2023
In pwa.module in implementation of hook_flush_caches
cache_set
used to set data from _pwa_serviceworker_file
. In _pwa_fetch_offline_page_resources
function if drupal_http_reques
t return empty data this can cause an error "ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in DOMDocument->loadHTML()" after switching to PHP8 and trying to clear cache in pwa.module, line 250
According to https://www.php.net/manual/en/language.operators.errorcontrol.php:
"Prior to PHP 8.0.0, the error_reporting() called inside the custom error handler always returned 0 if the error was suppressed by the @ operator.
As of PHP 8.0.0, it returns the value E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE."
and
"Prior to PHP 8.0.0, it was possible for the @ operator to disable critical errors that will terminate script execution. For example, prepending @ to a call of a function which did not exist, by being unavailable or mistyped, would cause the script to terminate with no indication as to why."
there is a need to add additional check for $response->data
.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.