解决lists标签中,加上where后其他条件失效的问题
添加时间:2023-03-14 10:10:41
{pc:content action="lists" catid="$catid" where="posids`!='0'" thumb="1" num="10"}
if(isset($data['where'])) {$sql = $data['where'];} else {$thumb = intval($data['thumb']) ? " AND thumb != ''" : '';if($this->category[$catid]['child']) {$catids_str = $this->category[$catid]['arrchildid'];$pos = strpos($catids_str,',')+1;$catids_str = substr($catids_str, $pos);$sql = "status=99 AND catid IN ($catids_str)".$thumb;} else {$sql = "status=99 AND catid='$catid'".$thumb;}}
/*以下为创想工作室修改开始*/if(isset($data['where'])) {$where = (isset($data['where'])&&(!empty($data['where'])))?' AND '.$data['where']:'';$thumb = intval($data['thumb']) ? " AND thumb != ''" : '';if($this->category[$catid]['child']) {$catids_str = $this->category[$catid]['arrchildid'];$pos = strpos($catids_str,',')+1;$catids_str = substr($catids_str, $pos);$sql = "status=99".$where." AND catid IN ($catids_str)".$thumb;} else {$sql = "status=99".$where." AND catid='$catid'".$thumb;}} else {$thumb = intval($data['thumb']) ? " AND thumb != ''" : '';if($this->category[$catid]['child']) {$catids_str = $this->category[$catid]['arrchildid'];$pos = strpos($catids_str,',')+1;$catids_str = substr($catids_str, $pos);$sql = "status=99 AND catid IN ($catids_str)".$thumb;} else {$sql = "status=99 AND catid='$catid'".$thumb;}}
202307-23
phpcms切换到php7.2后无法修改文章提示Uncaught Error: [] operator not supported for strings
前段时间将客户的phpcms站点升级到php7 2,相对比较顺利,但是今天他反应文章无法修改了,提示Uncaught Error: [] operator not sup