| 现象:DZ 7.2如果发的帖子中包含了无效图片链接,在网页的顶部就会出现 
 Warning: sprintf() [function.sprintf]: Too few arguments in D:\wwwroot\include\discuzcode.func.php on line 369解决:include\discuzcode.func.php 422~424行,将:
 
 
 function parseimg($width, $height, $src) {
 return bbcodeurl($src, '<img'.($width > 0 ? " width=\"$width\"" : '').($height > 0 ? " height=\"$height\"" : '')." src=\"$src\" border=\"0\" alt=\"\" />");
 }
修改为:
 
 function parseimg($width, $height, $src) {return bbcodeurl($src, str_replace('%','%%','<img'.($width > 0 ? " width=\"$width\"" : '').($height > 0 ? " height=\"$height\"" : '')." src=\"$src\" border=\"0\" alt=\"\" />"));
 }
 |