[wp-trac] [WordPress Trac] #55329: add_clean_index function throws PHP notice error
WordPress Trac
noreply at wordpress.org
Wed Nov 19 08:57:22 UTC 2025
#55329: add_clean_index function throws PHP notice error
-----------------------------+------------------------------
Reporter: gvgvgvijayan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-----------------------------+------------------------------
Comment (by philipzimmerm56):
## Benefits:
Improved Performance: By ensuring that indexes are only added if they
don't already exist, we avoid unnecessary database operations, reducing
execution time and resource usage.
Increased Code Reusability: The has_index() function is a reusable
utility, simplifying future database operations that involve index checks.
Cleaner Logic: The logic for adding indexes is now more streamlined and
easier to understand, with the check for existing indexes encapsulated in
a dedicated function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55329#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list