[wp-trac] [WordPress Trac] #58309: Save a few processing cycles by removing redundant is_object
WordPress Trac
noreply at wordpress.org
Sun May 14 18:52:17 UTC 2023
#58309: Save a few processing cycles by removing redundant is_object
-------------------------+------------------------------
Reporter: Presskopp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
-------------------------+------------------------------
Comment (by costdev):
Unfortunately, [https://www.php.net/manual/en/function.get-resource-
type.php get_resource_type()] will return an error for a non-resource, so
we need the `is_resource()`
> This function will return `null` and generate an error if `resource` is
not a resource.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58309#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list