[wp-trac] [WordPress Trac] #48272: "Undefined offset" warning in add_query_arg()

WordPress Trac noreply at wordpress.org
Mon May 4 17:08:00 UTC 2020


#48272: "Undefined offset" warning in add_query_arg()
-------------------------------+------------------------------
 Reporter:  sumitsingh         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  5.2.3
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration
-------------------------------+------------------------------

Comment (by clnumendo):

 Hello,

 so, if we can't call the function with one string argument without trigger
 PHP notices, maybe you should modify the documentation that tell us that
 only one argument is required.

 https://developer.wordpress.org/reference/functions/add_query_arg/

 {{{
 $key
 (string|array) (Required) Either a query variable key, or an associative
 array of query variables.

 $value
 (string) (Optional) Either a query variable value, or a URL to act upon.

 $url
 (string) (Optional) A URL to act upon.
 }}}

 Indeed, i want to show you what my error.log look like ;)
 {{{
 [04-May-2020 18:48:02 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:02 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:03 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:03 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:05 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:05 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:06 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:06 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:07 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:07 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:08 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:08 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:10 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:10 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:10 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:10 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:11 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:11 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:12 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:12 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:50 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:50 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:53 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:48:53 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:49:19 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:49:19 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:49:20 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:49:20 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:50:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:50:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:50:52 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:50:52 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:51:20 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:51:20 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:51:23 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:51:23 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:52:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:52:51 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:52:52 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:52:52 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:53:21 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:53:21 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:53:22 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 [04-May-2020 18:53:22 Europe/Paris] PHP Notice:  Undefined offset: 1 in
 /var/www/html/wp-includes/functions.php on line 1131
 ...
 }}}

 Thanks

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48272#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list