You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(class-kirki-field.php, line 320)
It seems to me that this logic may cause errors if one do what it's actually trying to prevent.
The if statement is verifying if only$args are being passed (no config_id), and set the $this->kirki_config = 'global', but then, when it leaves the if statement, it reasign $this->kirki_config to the output of trim( esc_attr( $config_id ) ), which in the case the user didn't pass it, will be an array and will output an error.
Possible fix would be to put an elsestatement there
I didn't test it, but that'd probably do the trick.
I'd put a PR for it, but I didn't see anybody doing PRs here beside the plugin authors and I'm not sure the proper way to do that. So let me know the guidelines for it, if it's possible
Version used:
(Did you try using the develop branch from github? There's a chance your issue has already been adressed there)
3.0.5
edit: same thing on 3.0.6
The text was updated successfully, but these errors were encountered:
Issue description:
I was reading through Kirki's code to try to find out another problem (#1425) I'm having, and I found this piece of code:
(class-kirki-field.php, line 320)
It seems to me that this logic may cause errors if one do what it's actually trying to prevent.
The if statement is verifying if only
$args
are being passed (no config_id), and set the$this->kirki_config = 'global'
, but then, when it leaves the if statement, it reasign$this->kirki_config
to the output oftrim( esc_attr( $config_id ) )
, which in the case the user didn't pass it, will be an array and will output an error.Possible fix would be to put an
else
statement thereI didn't test it, but that'd probably do the trick.
I'd put a PR for it, but I didn't see anybody doing PRs here beside the plugin authors and I'm not sure the proper way to do that. So let me know the guidelines for it, if it's possible
Version used:
(Did you try using the develop branch from github? There's a chance your issue has already been adressed there)
3.0.5
edit: same thing on 3.0.6
The text was updated successfully, but these errors were encountered: