Make WordPress Core

Changeset 13857


Ignore:
Timestamp:
03/28/2010 02:57:09 AM (15 years ago)
Author:
dd32
Message:

Check if function exists before using it. imageistruecolor() requires PHP 4.3.2, WordPress requires 4.3.0 at this stage. Fixes #12297

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r13827 r13857  
    372372
    373373    // convert from full colors to index colors, like original PNG.
    374     if ( IMAGETYPE_PNG == $orig_type && !imageistruecolor( $image ) )
     374    if ( IMAGETYPE_PNG == $orig_type && function_exists('imageistruecolor') && !imageistruecolor( $image ) )
    375375        imagetruecolortopalette( $newimage, false, imagecolorstotal( $image ) );
    376376
Note: See TracChangeset for help on using the changeset viewer.