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

Also available in: Atom PDF