Use maybe_serialize() where appropriate. fixes #19617.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f51df65e0
commit
c68f8c46f0
|
@ -1212,9 +1212,9 @@ function wp_check_browser_version() {
|
||||||
* 'img_src' - string - An image representing the browser
|
* 'img_src' - string - An image representing the browser
|
||||||
* 'img_src_ssl' - string - An image (over SSL) representing the browser
|
* 'img_src_ssl' - string - An image (over SSL) representing the browser
|
||||||
*/
|
*/
|
||||||
$response = unserialize( wp_remote_retrieve_body( $response ) );
|
$response = maybe_unserialize( wp_remote_retrieve_body( $response ) );
|
||||||
|
|
||||||
if ( ! $response )
|
if ( ! is_array( $response ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week
|
set_site_transient( 'browser_' . $key, $response, 604800 ); // cache for 1 week
|
||||||
|
|
|
@ -843,7 +843,7 @@ function wpmu_activate_signup($key) {
|
||||||
return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup );
|
return new WP_Error( 'already_active', __( 'The site is already active.' ), $signup );
|
||||||
}
|
}
|
||||||
|
|
||||||
$meta = unserialize($signup->meta);
|
$meta = maybe_unserialize($signup->meta);
|
||||||
$user_login = $wpdb->escape($signup->user_login);
|
$user_login = $wpdb->escape($signup->user_login);
|
||||||
$user_email = $wpdb->escape($signup->user_email);
|
$user_email = $wpdb->escape($signup->user_email);
|
||||||
$password = wp_generate_password( 12, false );
|
$password = wp_generate_password( 12, false );
|
||||||
|
|
|
@ -885,14 +885,14 @@ function count_users($strategy = 'time') {
|
||||||
$users_of_blog = $wpdb->get_col( "SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'" );
|
$users_of_blog = $wpdb->get_col( "SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'" );
|
||||||
|
|
||||||
foreach ( $users_of_blog as $caps_meta ) {
|
foreach ( $users_of_blog as $caps_meta ) {
|
||||||
$b_roles = unserialize($caps_meta);
|
$b_roles = maybe_unserialize($caps_meta);
|
||||||
if ( is_array($b_roles) ) {
|
if ( ! is_array( $b_roles ) )
|
||||||
foreach ( $b_roles as $b_role => $val ) {
|
continue;
|
||||||
if ( isset($avail_roles[$b_role]) ) {
|
foreach ( $b_roles as $b_role => $val ) {
|
||||||
$avail_roles[$b_role]++;
|
if ( isset($avail_roles[$b_role]) ) {
|
||||||
} else {
|
$avail_roles[$b_role]++;
|
||||||
$avail_roles[$b_role] = 1;
|
} else {
|
||||||
}
|
$avail_roles[$b_role] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue