File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1512,7 +1512,7 @@ function register_post_status( $post_status, $args = array() ) {
15121512function get_post_status_object ( $ post_status ) {
15131513 global $ wp_post_statuses ;
15141514
1515- if ( empty ( $ wp_post_statuses [ $ post_status ] ) ) {
1515+ if ( ! is_string ( $ post_status ) || empty ( $ wp_post_statuses [ $ post_status ] ) ) {
15161516 return null ;
15171517 }
15181518
@@ -2455,6 +2455,10 @@ function is_post_type_viewable( $post_type ) {
24552455 */
24562456function is_post_status_viewable ( $ post_status ) {
24572457 if ( is_scalar ( $ post_status ) ) {
2458+ if ( ! is_string ( $ post_status ) ) {
2459+ return false ;
2460+ }
2461+
24582462 $ post_status = get_post_status_object ( $ post_status );
24592463
24602464 if ( ! $ post_status ) {
You can’t perform that action at this time.
0 commit comments