We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 962eb22 commit 6cdd560Copy full SHA for 6cdd560
1 file changed
event/listener.php
@@ -121,12 +121,13 @@ public function add_googleanalytics_configs($event)
121
*/
122
public function validate_googleanalytics_id($event)
123
{
124
+ $input = $event['cfg_array']['googleanalytics_id'];
125
+
126
// Check if the validate test is for google_analytics
- if ($event['config_definition']['validate'] == 'googleanalytics_id')
127
+ if (($event['config_definition']['validate'] == 'googleanalytics_id') && ($input is !== ''))
128
129
// Store the error and input event data
130
$error = $event['error'];
- $input = $event['cfg_array'][$event['config_name']];
131
132
// Add error message if the input is not a valid Google Analytics ID
133
if (!preg_match('/^ua-\d{4,9}-\d{1,4}$/i', $input))
0 commit comments