Actions
Bug #14218
closedDeleting a shellcmd entry results in a PHP error and crash report
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
23.01
Affected Architecture:
Description
1. Install the shellcmd package from System > Package Manager.
2. Services > shellcmd >
Command:
touch /tmp/file.txt
Shellcmd Type: shellcmd
Click Save
3. Save again.
4. Now trying to delete that entry results in the browser showing:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/shellcmd.inc:44 Stack trace: #0 /usr/local/www/pkg.php(142) : eval()'d code(1): shellcmd_delete_php_command() #1 /usr/local/www/pkg.php(142): eval() #2 {main} thrown in /usr/local/pkg/shellcmd.inc on line 44 PHP ERROR: Type: 1, File: /usr/local/pkg/shellcmd.inc, Line: 44, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/shellcmd.inc:44 Stack trace: #0 /usr/local/www/pkg.php(142) : eval()'d code(1): shellcmd_delete_php_command() #1 /usr/local/www/pkg.php(142): eval() #2 {main} thrown
A crash report is then available on the dashboard with the contents:
[31-Mar-2023 15:19:48 America/Chicago] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/shellcmd.inc:44 Stack trace: #0 /usr/local/www/pkg.php(142) : eval()'d code(1): shellcmd_delete_php_command() #1 /usr/local/www/pkg.php(142): eval() #2 {main} thrown in /usr/local/pkg/shellcmd.inc on line 44
Updated by Christopher Cope about 2 months ago
- Status changed from New to Pull Request Review
Updated by Chris W about 2 months ago
A diff of the merge request fixes the problem when applied as a system patch. Deleting a shellcmd job doesn't give any errors or other issues.
Updated by Jim Pingle about 2 months ago
- Status changed from Pull Request Review to Feedback
- Assignee set to Christopher Cope
- % Done changed from 0 to 100
MR merged
Updated by Danilo Zrenjanin about 1 month ago
- Status changed from Feedback to Resolved
Tested against:
Shellcmd sysutils 1.0.5_3
It looks good.
I am marking this ticket resolved.
Actions