Skip to content

Commit 5be5ba9

Browse files
committed
revert return to false, return filtered null
1 parent f03614f commit 5be5ba9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

php/class-delivery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function add_post_id( $content ) {
118118
* @return int|null
119119
*/
120120
public function get_current_post_id() {
121-
return $this->current_post_id;
121+
return $this->current_post_id ? $this->current_post_id : null;
122122
}
123123

124124
/**

php/media/class-filter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public function get_video_shortcodes( $html ) {
9292
*
9393
* @param string $asset The media tag.
9494
* @param string $type The type.
95-
* @return int|null
95+
* @return int|false
9696
*/
9797
public function get_id_from_tag( $asset, $type = 'wp-image-|wp-video-' ) {
98-
$attachment_id = null;
98+
$attachment_id = false;
9999
// Get attachment id from class name.
100100
if ( preg_match( '#class=["|\']?[^"\']*(' . $type . ')([\d]+)[^"\']*["|\']?#i', $asset, $found ) ) {
101101
$attachment_id = intval( $found[2] );

0 commit comments

Comments
 (0)