PHP 7.3 Compatibility : Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR'
etwordpress01 opened this issue · 3 comments
Hi, We have some issues with that plugin. In PHP version 7.3 it display errors
Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR'
This line(3361) create the issue in bulk_install funtion
$res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
Can you please resolve this issue as soon as possible
Thanks
@etwordpress01 How are you using TGMPA ?
The WP_CONTENT_DIR
constant should always be defined, either in the wp-config.php
file or via the wp-includes/default-constants.php
file which should both be loaded before TGMPA, so I'd like to understand how you are using TGMPA.
Please provide detailed steps on how to reproduce this issue.
Hi, @jrfnl Thank you for the quick response
We are using TGMP plugin into our premium themes. We are including attached file into WordPress functions.php https://www.dropbox.com/s/uqwu2tpqajsltwh/tgmp.zip?dl=0
We just faced below issues when go to PHP version 7.3
Warning: Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in /home1/houzillo/public_html/projects/doctreat/wp-includes/load.php on line 141
and this constant is being used in only TGMP plugin which is included in theme. I though might be this would be the reason.
Can you please confirm it?
Thanks
Thanks
@etwordpress01 Please post code in gists instead as downloads via dropbox. I'm not risking downloading viruses.
Warning: Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in /home1/houzillo/public_html/projects/doctreat/wp-includes/load.php on line 141
Either way, that error does not come from TGMPA, but from the wp-includes/load.php
file which is part of WordPress Core. If you are on the latest version of WP, you may want to file a bug in Trac, otherwise: please upgrade your WP install and try again.