Fix PHP 7.4 compatibility issue
authorMatthias Schmidt <gravatronics@live.com>
Thu, 7 May 2020 14:52:16 +0000 (16:52 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 7 May 2020 14:52:16 +0000 (16:52 +0200)
wcfsetup/install/files/lib/system/option/BooleanOptionType.class.php
wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php

index 0836bd7c85520802c0ac7df509be1b0ac899fe98..1f228cad0f49edb4461bb93a22755b72b0f71ff2 100644 (file)
@@ -112,7 +112,7 @@ class BooleanOptionType extends AbstractOptionType implements ISearchableConditi
                $result = [];
                
                foreach ($options as $item) {
-                       if ($item{0} == '!') {
+                       if ($item[0] == '!') {
                                if ($value) $result[] = $item;
                        }
                        else {
index 9acc7c532ca1f8d1393b231b80c45d3db635c61c..b1ab8e6f744ca6a6009506d039f07572ce7f3ce6 100644 (file)
@@ -153,7 +153,7 @@ class RadioButtonOptionType extends AbstractOptionType implements ISearchableCon
                                $result = [];
                                
                                foreach ($options as $item) {
-                                       if ($item{0} == '!') {
+                                       if ($item[0] == '!') {
                                                $result[] = $item;
                                        }
                                        else {