janboddez/share-on-mastodon

is_int instead of ctype_digit

Closed this issue · 1 comments

I think in, e.g.,

if ( empty( $post_id ) || ! ctype_digit( (string) $post_id ) ) {
we can simply move to is_int as it's a REST API only thing and JSON, unlike form requests, will give us an integer rather than a string.

Turns out this isn't true, at least not always.