Automattic / newspack-custom-content-migrator

Custom migration tasks for launching and migrating Newspack sites on Atomic
5 stars 5 forks source link

fix: type casting `$attachment_id` to `int`. Now matches DocBlock. #508

Closed eddiesshop closed 4 months ago

eddiesshop commented 4 months ago

Although $attachment_id is an integer value, it technically remains a string because that's how it's returned from the $wpdb query result. To match the DocBlock description of the return values, a call to intval has been added to ensure that the $attachment_id being return is indeed an integer.