从今天早上开始,我试着知道为什么这个错误在我的wordpress全新安装上。 当我尝试在后期预览上放置图像时,它会附加。 预览不起作用,因为
上的src上的url是坏的<img src="http://myname.com/wp-content/uploads/2012/12/" width="" height="" style="position: absolute; opacity: 0;"/>
apache2日志:
[Sun Dec 09 15:54:44 2012] [error] PHP Warning: getimagesize() expects parameter 1 to be string, object given in /var/www/wordpress/wp-content/themes/montezuma/includes/thumb.php on line 222
[Sun Dec 09 15:54:44 2012] [error] PHP Warning: basename() expects parameter 1 to be string, object given in /var/www/wordpress/wp-content/themes/montezuma/includes/thumb.php on line 223
我的php版本: PHP 5.3.3-7 + pushze14与Suhosin-Patch(cli)
我的wordpress版本: 版本3.4.2
thumb.php中的行:
220 // no cache files - let's finally resize it
221 $new_img_path = image_resize( $file_path, $width, $height, $crop );
222 $new_img_size = getimagesize( $new_img_path );
223 $new_img = str_replace( basename( $image_src[0] ), basename( $new_img_path ), $image_src[0] );
有什么想法吗?
答案 0 :(得分:0)
我找到了完全相同问题的解决方案。
上传时,图片的宽度必须至少为900像素。