1
这是我收到的错误消息:我想知道是否有人可以解释这个错误意味着什么,以及下面的代码将如何解决。只有变量应该通过引用错误传递
错误信息:(381线是$学期线)只有变量应该通过线381引用传递
<?php // Student Fee section
if ($user->isStudentFeeDue()):
$semester = array_shift(array_slice($courses, 0, 1))->getSemester();
$studentfee = new UserLocationBasedStudentFee($semester, $user);
$purchase->addItem($studentfee);
?>
<div style="border-top: 2px solid rgb(0, 0, 0); padding: 16px 6px;">
<label>
<?php echo $studentfee->getDescription(); ?>
(<?php echo money_format(CBV\MONEY_FORMAT_COMMON, $studentfee->getCost()); ?>)
</label>
</div>
<?php endif; ?>
谢谢 - 完美的答案。 – JakeTenz