[wp-trac] [WordPress Trac] #59176: functions.php loads more than one time at one refresh
WordPress Trac
noreply at wordpress.org
Thu Aug 24 10:57:05 UTC 2023
#59176: functions.php loads more than one time at one refresh
--------------------------+----------------------
Reporter: skarabeq | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version: 6.3
Severity: major | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Changes (by johnbillion):
* status: assigned => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Thanks for the report @skarabeq.
This is almost certainly caused by multiple requests being sent to your
site (for example an Ajax request or an asset that triggers a 404
response), rather than functions.php loading more than once in a single
request. If that was the case you'd most likely see a fatal error due to a
function redefinition, and the problem would be much more severe and
visible.
I recommend that in your `write_log()` function you add the contents of
`$_SERVER` so you can see the URL path that's requested for each log
entry, and then go from there.
I'll close this ticket off as I am confident this is not a bug in the
WordPress core software. If you need any further help, please try
[https://wordpress.org/support/forums/ the WordPress.org support forums]
or [https://wordpress.stackexchange.com/ WordPress Development Stack
Exchange].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59176#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list