Project

General

Profile

Actions

Bug #1310

closed

Check pakcage .inc files before including to avoid potential breakage

Added by Jim Pingle over 13 years ago. Updated over 8 years ago.

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

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

To prevent a broken package from causing even more breakage, we should probably do a check on the package .inc files before including them.

Something like the code dvserg suggests here:
http://forum.pfsense.org/index.php/topic,32867.0.html

if (exec("php -l $pkg_inc") )  {
        require_once($pkg_inc);
        ...

Ideally package authors should be more careful about function name collisions and similar problems but this would at least prevent the breakage from causing too much collateral damage in the process.

Actions

Also available in: Atom PDF