Project

General

Profile

Actions

Bug #12713

closed

PHP error on ``pkg_mgr_install.php`` when multiple instances are running

Added by Jim Pingle almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Package System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

There is a PHP syntax error causing an error in pkg_mgr_install.php which gets triggered if multiple pkg processes are attempting to run at the same time:

PHP Warning:  sprintf(): Too few arguments in /usr/local/www/pkg_mgr_install.php on line 667
PHP Warning:  gettext() expects exactly 1 parameter, 2 given in /usr/local/www/pkg_mgr_install.php on line 668

The code in question is:

        /*
         * If pfSense-upgrade failed to run, present log to user
         */
        if ($another_instance) {
            $failmsg = gettext(sprintf("Another instance of %s " .
                "is running.  Try again later"),
                $g['product_name'] . "-upgrade");
        } elseif (!$start_polling) {

The parenthesis are incorrect in the sprintf call, both should be after -upgrade".

Actions #1

Updated by Jim Pingle almost 3 years ago

  • Status changed from New to Pull Request Review
Actions #2

Updated by Jim Pingle almost 3 years ago

  • Status changed from Pull Request Review to Feedback
  • Target version set to 2.6.0
  • Plus Target Version set to 22.01

Merged and picked for 22.01/2.6.0

Actions #3

Updated by Jim Pingle almost 3 years ago

  • % Done changed from 0 to 100
Actions #4

Updated by Jim Pingle almost 3 years ago

  • Status changed from Feedback to Resolved

This was tricky to make happen on purpose before, but the correct syntax is present in the repo now so the PHP error couldn't happen with the current code.

Actions

Also available in: Atom PDF