In files (in override template), using 1.0.8.21 PHP8, we have removed Lines 118-127 from checkout_shipping
Code: Select all
$comments_textarea = new Textarea('comments', [
'cols' => '60',
'rows' => '5',
'id' => 'inputComments',
'placeholder' => ENTRY_COMMENTS_PLACEHOLDER,
]);
if (isset($_SESSION['comments'])) {
$comments_textarea->set_text($_SESSION['comments']);
}Code: Select all
<div class="form-group row">
<label for="inputComments" class="col-form-label col-sm-4 text-sm-right"><?= ENTRY_COMMENTS ?></label>
<div class="col-sm-8"><?= $comments_textarea ?></div>
</div>PHP Warning: Undefined array key "comments" in //includes/system/versioned/1.0.7.4/shipping.php on line 145
Stack trace:
1. {main}() //checkout_shipping.php:0
2. shipping->process_selection() //checkout_shipping.php:28
We can live with the warning but is there a better way to achieve this without the warning?