Project

General

Profile

Bug #9067

PHP error when installing first package with empty installedpackages tag

Added by Jim Pingle 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Very High
Assignee:
Category:
Package System
Target version:
Start date:
10/25/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4
Affected Architecture:
All

Description

If the configuration contains only <installedpackages></installedpackages> then installing a package will fail with a PHP error:

[25-Oct-2018 19:35:51 Etc/UTC] PHP Warning:  Illegal string offset 'package' in /etc/inc/pkg-utils.inc on line 790
[25-Oct-2018 19:35:51 Etc/UTC] PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
Stack trace:
#0 /etc/rc.packages(74): install_package_xml('Cron')
#1 {main}
  thrown in /etc/inc/pkg-utils.inc on line 790

Associated revisions

Revision bfd3334b (diff)
Added by Jim Pingle 3 months ago

Initialize package arrays before use. Fixes #9067

Revision b77f0bf1 (diff)
Added by Jim Pingle 3 months ago

Initialize package arrays before use. Fixes #9067

(cherry picked from commit bfd3334b4bc9ae0d3c43f69e8305c83b0da3aa58)

History

#1 Updated by Jim Pingle 3 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#2 Updated by Danilo Zrenjanin 3 months ago

I've upgraded to:

2.4.5-DEVELOPMENT (ARM)
built on Wed Nov 07 16:23:36 EST 2018
FreeBSD 11.2-RELEASE-p4

Configuration contained only <installedpackages></installedpackages>

I installed successfully Acme package without any PHP error messages.

#3 Updated by Jim Pingle 3 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF