- Timestamp:
- 08/22/2016 10:32:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-notice.php
r10421 r11028 63 63 public function __construct( $id = null ) { 64 64 if ( $id ) { 65 $this->id = $id;65 $this->id = (int) $id; 66 66 $this->populate(); 67 67 } … … 86 86 $this->message = $notice->message; 87 87 $this->date_sent = $notice->date_sent; 88 $this->is_active = $notice->is_active;88 $this->is_active = (int) $notice->is_active; 89 89 } 90 90 } … … 233 233 $notices = $wpdb->get_results( "SELECT * FROM {$bp->messages->table_name_notices} ORDER BY date_sent DESC {$limit_sql}" ); 234 234 235 // Integer casting. 236 foreach ( (array) $notices as $key => $data ) { 237 $notices[ $key ]->id = (int) $notices[ $key ]->id; 238 $notices[ $key ]->is_active = (int) $notices[ $key ]->is_active; 239 } 240 235 241 return $notices; 236 242 }
Note: See TracChangeset
for help on using the changeset viewer.