2014-07-02 81 views
0

林的Drupal 7時,我想公衆的文章我的admin點擊/內容顯示了錯誤Drupal的圖像縮放誤差使用

Recoverable fatal error: Argument 1 passed to image_resize() must be an instance of stdClass, boolean given, called in 
**my_patch** /sites/all/modules/image_resize_filter/image_resize_filter.module on line 515 and defined w image_resize() (line 279 to /**my_patch**/includes/image.inc). 

我應該怎麼辦?

回答

0

但它應該如何看起來正確的代碼?我不知道關於編程...模塊

錯誤/ image_resize_filter.module上線515:

// Resize the local image if the sizes don't match. 
          elseif ($image['resize']) { 
          $res = image_load($image['local_path']); 
     **this is line 515:** image_resize($res, $image['expected_size']['width'], $image['expected_size']['height']); 
          image_save($res, $image['destination']); 
     } 

中包括/ image.inc行279:

this is line 279 function image_resize(stdClass $image, $width, $height) { 
    $width = (int) round($width); 
    $height = (int) round($height); 

    return image_toolkit_invoke('resize', $image, array($width, $height)); 
}