Make WordPress Core

Ticket #28315: 28315.diff

File 28315.diff, 465 bytes (added by jacklenox, 11 years ago)

Added a patch using kitchin's suggestion above.

  • wp-includes/meta.php

    diff --git wp-includes/meta.php wp-includes/meta.php
    index 2f272f4..45892a8 100644
    function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v 
    137137        if ( !$meta_type || !$meta_key )
    138138                return false;
    139139
    140         if ( !$object_id = absint($object_id) )
     140        if ( !is_scalar($object_id) || !$object_id = absint($object_id) )
    141141                return false;
    142142
    143143        if ( ! $table = _get_meta_table($meta_type) )