Changeset 13793
- Timestamp:
- 04/12/2024 01:28:59 PM (8 months ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-attachments.php
r13468 r13793 1574 1574 } 1575 1575 1576 if ( empty( $_POST['object'] ) || empty( $_POST['item_id'] ) || ( ! ctype_digit( $_POST['item_id'] ) && ! is_int( $_POST['item_id'] ) ) ) {1576 if ( empty( $_POST['object'] ) || empty( $_POST['item_id'] ) || ( ! ctype_digit( (string) $_POST['item_id'] ) && ! is_int( $_POST['item_id'] ) ) ) { 1577 1577 wp_send_json_error(); 1578 1578 } -
trunk/src/bp-core/classes/class-bp-media-extractor.php
r13508 r13793 778 778 779 779 // A width was specified but not a height, so calculate it assuming a 4:3 ratio. 780 if ( ! isset( $extra_args['height'] ) && ctype_digit( $extra_args['width'] ) ) {780 if ( ! isset( $extra_args['height'] ) && ctype_digit( (string) $extra_args['width'] ) ) { 781 781 $extra_args['height'] = round( ( $extra_args['width'] / 4 ) * 3 ); 782 782 } 783 783 784 if ( ctype_digit( $extra_args['width'] ) ) {784 if ( ctype_digit( (string) $extra_args['width'] ) ) { 785 785 $image_size = array( $extra_args['width'], $extra_args['height'] ); 786 786 } else { … … 877 877 // Validate the size of the images requested. 878 878 if ( isset( $extra_args['width'] ) ) { 879 if ( ! isset( $extra_args['height'] ) && ctype_digit( $extra_args['width'] ) ) {879 if ( ! isset( $extra_args['height'] ) && ctype_digit( (string) $extra_args['width'] ) ) { 880 880 // A width was specified but not a height, so calculate it assuming a 4:3 ratio. 881 881 $extra_args['height'] = round( ( $extra_args['width'] / 4 ) * 3 ); 882 882 } 883 883 884 if ( ctype_digit( $extra_args['width'] ) ) {884 if ( ctype_digit( (string) $extra_args['width'] ) ) { 885 885 $image_size = array( $extra_args['width'], $extra_args['height'] ); 886 886 } else {
Note: See TracChangeset
for help on using the changeset viewer.