Please help to resolve this problem. Im not programmer but im really need help to fix this problem.
if( TP_MASONRY )
{
$this->item->text = JFilterOutput::ampReplace($this->item->text);
preg_match_all("/<img[^>]*>/Ui", $this->item->text, $txtimg);
if (!empty($txtimg[0])) {
foreach ($txtimg[0] as $txtimgel) {
$this->item->text = str_replace($txtimgel,"",$this->item->text);
if ( $n == 0 )
{
preg_match_all("#src="([:-/_A-Za-z0-9.]+)"#",$txtimgel,$txtimgelsr);
$this->item->img = ( !empty( $txtimgelsr[1][0] ) ) ? $txtimgelsr[1][0] : null;
}
}
}
}
Undefines variable: if ( $n == 0 )
Thanks in advance