[wp-trac] [WordPress Trac] #62722: Fix all ABSPATH direct access errors

WordPress Trac noreply at wordpress.org
Tue Jun 10 15:57:00 UTC 2025


#62722: Fix all ABSPATH direct access errors
-------------------------------------+------------------------------
 Reporter:  bor0                     |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-test-info  |     Focuses:
-------------------------------------+------------------------------
Changes (by SirLouen):

 * keywords:  has-patch changes-requested => has-patch has-test-info


Comment:

 A little extra update: I've been playing around a little with this

 Taking your sequence, I've built this single command, which can display
 the results (using `wordpress-develop` environment)

 `(find . -path './wp-content' -prune -false -o -name '*.php' -print | sed
 's|^\./||' | sort -u | xargs -P 10 -I {} curl -s -o /dev/null
 "http://localhost:8889/{}"; grep ABSPATH wp-content/debug.log | grep -o
 '/[^ ]*.php' | sort -u)`

 Moreover, I see that the number of files being reported on `debug.log`
 with errors on execution, is practically infinite (not just the `ABSPATH`
 ones).

 And I wonder if something like this can be included in CI checks. Because
 it's interesting how your original results differ (issued only 6 months
 ago), differ from nowadays results. What we are doing here is bread for
 today, hunger for tomorrow.

 And probably this kind of checks could be expanded to virtually all
 potentially failing files in WP.

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


More information about the wp-trac mailing list