我使用了OZ的建议,但在is_array
测试上留下了一个错误。
但是,在待测试的阵列名称之前添加“@
。
if (is_array((@$errors))){
foreach ($errors as $error): ?>
<?php echo $error; ?>
<br/>
<?php endforeach;
}
and yes I know using @
is shoddy BUT I cannot get a tiny bit of inherited code working prettily. I can either spend another hour to fix that to get round a "your var is not defined" or stick a @
in and get the other things needed for a very ALFA version to share with a friend tomorrow. Oh and yes 11 pm and my brain is befuddled!
ATB Mr Grumpy
PS Big thanks to OZ_ for 95% of the solution!