Changeset 127

Show
Ignore:
Timestamp:
2008-01-18 17:36:38 (1 year ago)
Author:
hannes
Message:

handling non-existent images within IMG tags gracefully (ticket #68)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/misc/Format.php

    r108 r127  
    172172                        case '[img]': 
    173173                            // get image width and height 
    174                             $_img = getimagesize($_cont); 
     174                            if (!$_img = @getimagesize($_cont)) { 
     175                                $_img[0] = 0; 
     176                                $_img[1] = 0; 
     177                            } 
    175178                            $_attr_close = 'width="' . $_img[0] . '" height="' . $_img[1] . '"'; 
    176179                        break;