PHP message: PHP Warning: Undefined array key 1 in

Any critical bugs will be fixed within 24-48 hours.
Post Reply
User avatar
lvyulin
Posts: 70
Joined: 12 Dec 2022, 11:55
Name: les lv
Location: shanghai

PHP message: PHP Warning: Undefined array key 1 in

Post by lvyulin »

[error] 17061#0: *3158005 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key 1 in /www/modules/reports/actions/filters_options.php on line 530 PHP message: PHP Warning: Undefined array key 2 in /www/modules/reports/actions/filters_options.php on line 537"

Appears when switching from the original settings to the time and date fields

According to the code, both lines 530 and 537 are attempting to retrieve key values 1 and 2 from the $values array. Due to error messages indicating that these two keys may not be defined
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by support »

File from archive replace to modules\reports\actions\
Let me know if it works ok.
Attachments
filters_options.zip
(5.05 KiB) Downloaded 128 times
User avatar
lvyulin
Posts: 70
Joined: 12 Dec 2022, 11:55
Name: les lv
Location: shanghai

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by lvyulin »

At the moment, it's fine. Thank you
User avatar
lvyulin
Posts: 70
Joined: 12 Dec 2022, 11:55
Name: les lv
Location: shanghai

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by lvyulin »

A new issue has been discovered. When switching to the time type field with characters in the set value, an error message will be reported: Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in

From/www/includes/classes/fieldtypes/fieldtypeinput_datetime. php on line 173
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by support »

Not clear how to reproduce.
User avatar
lvyulin
Posts: 70
Joined: 12 Dec 2022, 11:55
Name: les lv
Location: shanghai

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by lvyulin »

I have found an issue. In the process, due to my previous value being of string type, when it exceeds a certain number of characters, such as "asfsdfdsdfsdfssdfssdfssdfssdfdfssdfssdfdfdfdfssdf", when switching to the time field, a message appears
Fatal error: Uncaught TypeError: data(): Argument # 2 ($timestamp) must be of type? Int, string given in/www/includes/classes/fieldtypes/fieldtype_input_datetime.php on line 173
User avatar
support
Site Admin
Posts: 6231
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: PHP message: PHP Warning: Undefined array key 1 in

Post by support »

Well the previous value should be delete rather than change type. Each type required own value.
Post Reply