Changeset 6415 for trunk/src/includes/topics/functions.php
- Timestamp:
- 05/19/2017 03:25:37 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6401 r6415 296 296 297 297 // Check a whitelist of possible topic status ID's 298 } elseif ( ! empty( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( $topic_statuses ) ) ) {298 } elseif ( ! empty( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( $topic_statuses ), true ) ) { 299 299 $topic_status = sanitize_key( $_POST['bbp_topic_status'] ); 300 300 … … 615 615 616 616 // Check a whitelist of possible topic status ID's 617 } elseif ( ! empty( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( $topic_statuses ) ) ) {617 } elseif ( ! empty( $_POST['bbp_topic_status'] ) && in_array( $_POST['bbp_topic_status'], array_keys( $topic_statuses ), true ) ) { 618 618 $topic_status = sanitize_key( $_POST['bbp_topic_status'] ); 619 619 … … 1122 1122 1123 1123 // Make sure we're not walking twice 1124 if ( ! in_array( $new_forum_id, $old_forum_ancestors ) ) {1124 if ( ! in_array( $new_forum_id, $old_forum_ancestors, true ) ) { 1125 1125 1126 1126 // Get topic ancestors … … 1533 1533 1534 1534 // Invalid split option 1535 if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ) ) ) {1535 if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) { 1536 1536 bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) ); 1537 1537 … … 1725 1725 1726 1726 // Not a reply to a reply that moved over 1727 if ( ! in_array( $reply_to, $reply_ids ) ) {1727 if ( ! in_array( $reply_to, $reply_ids, true ) ) { 1728 1728 bbp_update_reply_to( $reply->ID, 0 ); 1729 1729 } … … 1852 1852 1853 1853 // Bail if actions aren't meant for this function 1854 if ( ! in_array( $action, $possible_actions ) ) {1854 if ( ! in_array( $action, $possible_actions, true ) ) { 1855 1855 return; 1856 1856 } … … 2087 2087 $stickies = ( empty( $stickies ) || ! is_array( $stickies ) ) 2088 2088 ? array() 2089 : $stickies;2089 : wp_parse_id_list( $stickies ); 2090 2090 2091 2091 // Filter and return … … 2110 2110 $stickies = ( empty( $stickies ) || ! is_array( $stickies ) ) 2111 2111 ? array() 2112 : $stickies;2112 : wp_parse_id_list( $stickies ); 2113 2113 2114 2114 // Filter and return … … 3654 3654 if ( empty( $stickies ) ) { 3655 3655 $success = true; 3656 } elseif ( ! in_array( $topic_id, $stickies ) ) {3656 } elseif ( ! in_array( $topic_id, $stickies, true ) ) { 3657 3657 $success = true; 3658 3658 } elseif ( false === $offset ) {
Note: See TracChangeset
for help on using the changeset viewer.