Make WordPress Core

Ticket #23033: 23033.3.diff

File 23033.3.diff, 599 bytes (added by ericlewis, 11 years ago)
  • src/wp-includes/meta.php

     
    702702
    703703                $meta_type = strtoupper( $type );
    704704
    705                 if ( ! in_array( $meta_type, array( 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED', 'NUMERIC' ) ) )
     705                if ( ! preg_match( '/^(?:BINARY|CHAR|DATE|DATETIME|SIGNED|UNSIGNED|TIME|NUMERIC(?:\(\d+(?:,\s*\d+)?\))?|DECIMAL(?:\(\d+(?:,\s*\d+)?\))?)$/', $meta_type ) )
    706706                        return 'CHAR';
    707707
    708708                if ( 'NUMERIC' == $meta_type )