Skip to content

Commit

Permalink
Improved compatibility with modern PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers committed Jan 29, 2025
1 parent 9f38dff commit 5d8aa4d
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions modules/backend/classes/FormTabs.php
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ class FormTabs implements IteratorAggregate, ArrayAccess
public function __construct($section, $config = [])
{
$this->section = strtolower($section) ?: $this->section;
$this->config = $this->evalConfig($config);
$this->evalConfig($config);

if ($this->section == self::SECTION_OUTSIDE) {
$this->suppressTabs = true;
@@ -89,10 +89,8 @@ public function __construct($section, $config = [])

/**
* Process options and apply them to this object.
* @param array $config
* @return array
*/
protected function evalConfig($config)
protected function evalConfig(array $config): void
{
if (array_key_exists('defaultTab', $config)) {
$this->defaultTab = $config['defaultTab'];
2 changes: 1 addition & 1 deletion modules/backend/widgets/Form.php
Original file line number Diff line number Diff line change
@@ -708,7 +708,7 @@ protected function processAutoSpan($fields)
* @param string $addToArea
* @return void
*/
public function addFields(array $fields, $addToArea = null)
public function addFields(array $fields, $addToArea = '')
{
foreach ($fields as $name => $config) {
// Check if user has permissions to show this field

0 comments on commit 5d8aa4d

Please sign in to comment.