PHP warnings from DOMDocument::loadXML() and DOMDocument::loadHTML()

Since version 2.5.5, I’ve been seeing PHP warnings on every page load. They start at gravityforms.php line 6486, which is part of the should_inject_hooks_js method. I’ve been getting around it by adding a return false like this

if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
    return false;

if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
    return false;

if ( empty( $content ) ) {
    return false;

return false;

So currently my addition is added to line 6483, and it stops the errors. I don’t need any of the Gravity Forms JavaScript, so this doesn’t cause any problems for me, but I’m concerned that it hasn’t been fixed in the updates since then. Is this a known issue?

Hi Jonathan. Check your Gravity Forms System Report for the dom and xml extensions being loaded (in the Loaded Extension sections of the System Report under PHP). Those extensions not being installed is the most common reason for those warnings.

Thanks, I do have dom and libxml extensions loaded. Is there a different xml extension? I don’t know that we’d be able to get VIP Go to turn that on, but I guess we could ask. It would be nice to not have to rely on that, but is that the only option at this point?

There is a different XML extension. I have both listed in my system report:

Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, 
ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, 
readline, Reflection, session, standard, shmop,  SimpleXML, 
mbstring, tokenizer, xml, litespeed, dom, fileinfo, gd, imagick, 
json, exif, mysqlnd, mysqli, PDO, pdo_mysql, Phar, posix, 
sockets, xmlreader, xmlwriter, zip

At this time, we do not have a work around for that requirement.

I checked again, and here’s the list of extensions in my system report:

Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, readline, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, cgi-fcgi, apcu, bcmath, calendar, exif, gd, gmagick, gmp, intl, mcrypt, memcache, mysqli, pcntl, shmop, soap, sockets, sodium, ssh2, sysvsem, sysvshm, timezonedb, zip, newrelic, Zend OPcache

So we do have libxml, xml, simplexml, dom.

Please try updating to the latest build, available from the downloads page, following the steps at

Once updated you’ll also need to clear/flush any caching and/or script optimization plugins and/or services the site is using as well as your browser cache.

I use Gravity Forms via an agency license, so I don’t have access to the downloads. Are you suggesting that there has been/could be a fix? I’m happy to wait for a new release if that is the case, I was just hoping that it was an actual issue and I wouldn’t have to keep a manual return false on there.