[wp-trac] [WordPress Trac] #52323: Fatal error: Undefined constant "ABSPATH"

WordPress Trac noreply at wordpress.org
Tue Jan 19 02:00:02 UTC 2021


#52323: Fatal error: Undefined constant "ABSPATH"
--------------------------+------------------------------
 Reporter:  Mayhem30      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  5.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by Mayhem30):

 Yes, my file had this at the very end :

 {{{
 if ( !defined('ABSPATH') )
         define('ABSPATH', dirname(__FILE__) . '/');
 }}}

 I've now changed it to :

 {{{
 if ( ! defined( 'ABSPATH' ) ) {
         define( 'ABSPATH', __DIR__ . '/' );
 }
 }}}

 So far, it appears to have solved the issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52323#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list