Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.7.1
-
Component/s: None
-
Labels:None
Description
Reported on the forums here: https://www.blesta.com/forums/index.php?/topic/13221-enom-name-servers-tab-error/
When visiting the nameservers tab the user will receive an error:
A non-numeric value encountered on line 12 in path_to_blesta\components\modules\enom\views\default\tab_nameservers.pdt
This is because of lines 11-12 of tab_nameservers.pdt:
$this->Form->label($this->_('Enom.tab_nameserver.field_ns', true, $i+1), 'ns' . $i+1); $this->Form->fieldText('ns[]', $this->Html->ifSet($vars->ns[$i]), ['id' => 'ns' . $i+1]);
The dot operator in 'ns' . $i+1 is being executed before the plus. Wrap $i+1 in parens:
$this->Form->label($this->_('Enom.tab_nameserver.field_ns', true, $i+1), 'ns' . ($i+1)); $this->Form->fieldText('ns[]', $this->Html->ifSet($vars->ns[$i]), ['id' => 'ns' . ($i+1]));
The same applies to tab_client_nameservers.