[wp-trac] [WordPress Trac] #48693: Silence ini_set caused error or check if function_exists first
WordPress Trac
noreply at wordpress.org
Sat May 17 15:49:08 UTC 2025
#48693: Silence ini_set caused error or check if function_exists first
-------------------------------------------------+-------------------------
Reporter: drazon | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future
| Release
Component: Bootstrap/Load | Version: 5.3
Severity: normal | Resolution:
Keywords: has-patch needs-dev-note dev- | Focuses:
feedback changes-requested |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: needs-testing has-patch => has-patch needs-dev-note dev-
feedback changes-requested
Comment:
I see a problem [https://github.com/WordPress/wordpress-
develop/pull/7352.diff in this patch]: Its addressing too many things,
`exec` + `ini_set`, all in one. I think it would be better to have a
separate ticket for `exec` (just in case more scenarios in the future
could be addressed)
Also you are [https://github.com/WordPress/wordpress-
develop/blob/a50a4efd7526c3f81d38e6bf5d648b43702304f6/src/wp-
includes/pomo/po.php#L24 hindering functionality here], when you remove
`ini_set`, so you must not simply silence it, but in case you are go in
going to check for the absence of this, at least report it (notice or
whatever).
I partially agree with @jrf and @SergeyBiryukov. But like they say in my
country, "courtesy does not take away courage": It's true that is not the
best practice to remove `ini_set` but it doesn't hurt to check for it in
the code, knowingly that it's a very common practice among hosters,
courtesy could take place here and add some additional rules for sanity
with not much negative impact in exchange. Otherwise, I would add a `dev-
note` with information for hosters about this topic (at least when people
search in Google for this error, they end up with this note and they can
claim their hosters for bad practices).
But I would not leave this in no man's land:
1. Adjust the patch only for `ini_set`
2. Add a `dev-note` in the blog.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48693#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list