-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to undefined function libxml_disable_entity_loader() with php 8 #162
Comments
👍 I'm in the same issue, changing PHP to version 8 throw me an error and I'm the same case as @tedc, All my site on Kinsta need to be updated to PHP 8. In my case, somes update on the plugin has solved the issue. Trying with ➡️ On vendor package # /vender/voku/simple_html_dom/src/voku/helperHtmlDomParser.php
# line 303
- $disableEntityLoader = \libxml_disable_entity_loader(true);
+ if (\PHP_VERSION_ID < 80000) {
+ $disableEntityLoader = \libxml_disable_entity_loader(true);
+ }
# line 381
- \libxml_disable_entity_loader($disableEntityLoader);
+ if (\PHP_VERSION_ID < 80000 && isset($disableEntityLoader)) {
+ \libxml_disable_entity_loader($disableEntityLoader);
+ } # /vender/voku/simple_html_dom/src/voku/XmlDomParser.php
# line 112
- $disableEntityLoader = \libxml_disable_entity_loader(true);
+ if (\PHP_VERSION_ID < 80000) {
+ $disableEntityLoader = \libxml_disable_entity_loader(true);
+ }
# line 175
- \libxml_disable_entity_loader($disableEntityLoader);
+ if (\PHP_VERSION_ID < 80000 && isset($disableEntityLoader)) {
+ \libxml_disable_entity_loader($disableEntityLoader);
+ } In addition of that, plugin seems to return error when # /src/Blocks/Block.php
# Line 153
if ($result->isValid()) {
+ // Avoid error if innerHTML is empty
+ if (empty($data['innerHTML'])) {
+ return [
+ 'attributes' => $attributes,
+ 'type' => $type
+ ];
+ }
return [
'attributes' => array_merge(
self::source_attributes(HtmlDomParser::str_get_html($data['innerHTML']), $type),
$attributes
),
'type' => $type
];
} I hope this helps other people the time to have a plugin update |
I am running Kinsta and PHP 8.0 and am encountering the same problem. On the latest graphql Gutenberg plugin version (0.4.1), I had to SSH into the |
@pristas-peter @jasonbahl any update on this issue ? |
This should be considered as an alternative for those using javascript: it uses |
For those that is hosting this in kinsta, just contact the support team using the live chat. I just sent a screenshot and they fixed it. Not sure how but maybe there's some hosting configuration that they have to tweak. |
Hi, WP Graphql Gutenberg is returning this error, if I run php 8:
Internal Sever Error - Call to undefined function libxml_disable_entity_loader()
This is a big issue, libxml_disable_entity_loader() is strongly deprecated in php 8 and my hosting provider, Kinsta, is is abandoning support for php <8.
How can I solve?
The text was updated successfully, but these errors were encountered: