File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ public function getIcon()
52
52
53
53
public function getName ()
54
54
{
55
- return !is_null ($ this ->getKey ('feed ' )) ? self ::NAME . ' | ' . $ this ->getKey ('feed ' ) : self ::NAME ;
55
+ if ($ this ->getKey ('feed ' )) {
56
+ return self ::NAME . ' | ' . $ this ->getKey ('feed ' );
57
+ }
58
+ return self ::NAME ;
56
59
}
57
60
58
61
public function getURI ()
Original file line number Diff line number Diff line change @@ -314,11 +314,10 @@ public function getKey($input)
314
314
if (!isset ($ context )) {
315
315
$ context = $ this ->queriedContext ;
316
316
}
317
+
317
318
$ needle = $ this ->inputs [$ this ->queriedContext ][$ input ]['value ' ];
318
319
foreach (static ::PARAMETERS [$ context ][$ input ]['values ' ] as $ first_level_key => $ first_level_value ) {
319
- // todo: this cast emits error if it's an array
320
- $ valueString = (string ) $ first_level_value ;
321
- if ($ needle === $ valueString ) {
320
+ if (!is_array ($ first_level_value ) && $ needle === (string )$ first_level_value ) {
322
321
return $ first_level_key ;
323
322
} elseif (is_array ($ first_level_value )) {
324
323
foreach ($ first_level_value as $ second_level_key => $ second_level_value ) {
You can’t perform that action at this time.
0 commit comments