You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 4, 2020. It is now read-only.
Currently in the Post Meta unit test class the invalid meta id check will change the value of the meta_id to -1 which does not perform the action I think you want it to.
When you pass a value of -1 for the meta_id to the get_metadata_by_mid()* function it will then covert it to 1 from the function absint()**.
Currently in the Post Meta unit test class the invalid meta id check will change the value of the meta_id to
-1
which does not perform the action I think you want it to.When you pass a value of
-1
for themeta_id
to theget_metadata_by_mid()
* function it will then covert it to1
from the functionabsint()
**.An example of this is here: https://github.com/WP-API/wp-api-meta-endpoints/blob/master/tests/test-rest-meta-posts-controller.php#L938.
I think we should instead use a string for the invalid
meta_id
since it will throw and error no matter what at this line https://github.com/WordPress/WordPress/blob/571e14f897e92c6d330e89d4560f02fa7a958509/wp-includes/meta.php#L570.References:
** https://github.com/WordPress/WordPress/blob/571e14f897e92c6d330e89d4560f02fa7a958509/wp-includes/meta.php#L556-L595
*** https://github.com/WordPress/WordPress/blob/master/wp-includes/functions.php#L3604-L3614
The text was updated successfully, but these errors were encountered: