Merhaba arkadaşlar,

Kurmak istediğim temanın 2 satırında aşağıdaki hatayı alıyorum. Tema hazır bir template, kod bilgimde hiç yok. Bu hataları nasıl düzeltebiliriz?

Teşekkürler

Warning: Invalid argument supplied for foreach() in /home/..../.../.../.../temaadı/functions/admin-shortcodes.php on line 561

Warning: Invalid argument supplied for foreach() in /home/..../.../.../.../temaadı/functions/admin-shortcodes.php on line 372

İlgili satırlar;

$filteredprojs = array();
		if ($categories != "all"){
			foreach ($projs as $p){
				$projscats = get_the_terms($p->ID, 'portfolio_category');
				$found = false;
			(372. Satır) foreach ($projscats as $pcats){
					foreach ($thecats as $tc){
						if ($pcats->slug == $tc) $found = true;	
					}
				}
				if ($found) {
					array_push($filteredprojs, $p);
					$projs = $filteredprojs;
				}
$filteredprojs = array();
		if ($categories != "all"){
			foreach ($projs as $p){
				$projscats = get_the_terms($p->ID, 'portfolio_category');
				$found = false;
			(561. Satır)	foreach ($projscats as $pcats){
					foreach ($thecats as $tc){
						if ($pcats->slug == $tc) $found = true;	
					}
				}