{"id":18661737,"date":"2025-09-30T07:33:58","date_gmt":"2025-09-30T07:33:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/consider-avoid-undefined-array-key-error\/"},"modified":"2025-09-30T07:33:58","modified_gmt":"2025-09-30T07:33:58","slug":"consider-avoid-undefined-array-key-error","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/consider-avoid-undefined-array-key-error\/","title":{"rendered":"Consider avoid undefined array key error"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi there,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is not a request for support, I&#8217;m opening the issue hoping that plugin authors might consider in future versions, to update codes to avoid <strong>undefined array key<\/strong> error.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FastCGI sent in stderr: \"PHP message: PHP Warning:  Undefined array key \"ne\" in \/plugins\/newsletter\/subscription\/subscription.php on line 667<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">While reviewing the error logs on one of our sites, we saw quite a long list of this errors being printed into the log, it was caused by attacker trying to send a POST request like <code>\/?action=tnp&amp;na=sa HTTP\/1.0<\/code> , and this line of code in the plugin <code>$data-&gt;email = $posted['ne'];<\/code> will generate the undefined array key error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It would be great to have this improved in upcoming release of the plugins. <\/p>\n","protected":false},"template":"","class_list":["post-18661737","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18661737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18661737\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18661737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}