Prevent unsuccess str_replace

This commit is contained in:
wlx 2011-11-07 17:14:34 +00:00
parent bbaeeab8f1
commit c42e339d86
1 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ class ServiceController extends Zend_Controller_Action
preg_match_all('/<table>[\s\S]*?<\/table>/im', $row['description'],$tables);
foreach($tables as $k=>$table)
{
$row['description']=str_replace($tables[$k],"\n 【表格内容暂不支持,请访问网站查看,此处请忽略】\n",$row['description']);
$row['description']=@str_replace($tables[$k],"\n 【表格内容暂不支持,请访问网站查看,此处请忽略】\n",$row['description']);
}*/
$pdf=new MetadataPDF();
$pdf->metadata=$row;
@ -540,7 +540,7 @@ class ServiceController extends Zend_Controller_Action
$search[]="</table>";
$replace[]="</table:table>";
$table=str_replace($search,$replace,$table[0]);*/
$row['description']=str_replace($tables[$k][0],"\n 【表格内容暂不支持,请访问网站查看,此处请忽略】\n",$row['description']);
$row['description']=@str_replace($tables[$k][0],"\n 【表格内容暂不支持,请访问网站查看,此处请忽略】\n",$row['description']);
}
require_once('odtphp/library/odf.php');