[wp-trac] [WordPress Trac] #58788: Call to undefined function get_locale() in admin.php
WordPress Trac
noreply at wordpress.org
Wed Jul 12 21:02:11 UTC 2023
#58788: Call to undefined function get_locale() in admin.php
----------------------------+-----------------------------
Reporter: zyphlar | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Administration | Version: trunk
Severity: normal | Resolution: wontfix
Keywords: has-patch | Focuses: administration
----------------------------+-----------------------------
Comment (by zyphlar):
Thanks, in that case the real issue is that
> If WordPress is used on a production server, error displays should
be disabled, and/or direct access to the php files in the above
directories disabled.
is probably not a sustainable solution. I see the errors in my error logs
which makes me as an admin think that there's something broken with my
website. The onus shouldn't be on me as an admin to modify the htaccess or
other access controls of a software package to prevent spurious errors:
all unhandled exceptions represent an unexpected condition that deserves
investigation, so if failure on direct access is expected then the best
place to handle that is inside the script itself where it refuses to
proceed under invalid conditions.
You can close and #WontFix this, but it'll keep being an issue and keep
making people think there are problems, as the eight duplicate tickets
attest to. It shouldn't be hard to put a one-liner `exit("direct script
access disabled");` at the top of these files, or improved htaccess rules.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58788#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list