Skip to content

Commit 7a97fcf

Browse files
authored
Set to null instead of false (#154)
1 parent 9249096 commit 7a97fcf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

wp-graphql-yoast-seo.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ function wpcom_vip_attachment_url_to_postid($url)
130130
'default',
131131
12 * HOUR_IN_SECONDS + mt_rand(0, 4 * HOUR_IN_SECONDS) // phpcs:ignore
132132
);
133+
$id = null; // Set $id to null instead of false
133134
} else {
134135
wp_cache_set(
135136
$cache_key,
@@ -139,12 +140,12 @@ function wpcom_vip_attachment_url_to_postid($url)
139140
);
140141
}
141142
} elseif ('not_found' === $id) {
142-
return false;
143+
return null; // Return null instead of false
143144
}
144-
145+
145146
return $id;
146147
}
147-
}
148+
}
148149

149150
function wp_gql_seo_build_content_types($types)
150151
{

0 commit comments

Comments
 (0)