Closed Bug 341454 Opened 18 years ago Closed 18 years ago

testserver.pl requires $::ENV{'PATH'} to be defined

Categories

(Bugzilla :: Bugzilla-General, defect)

2.23
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Whiteboard: [blocker will fix])

Now that $::ENV{'PATH'} is removed in Bugzilla.pm, writing

$foo = $::ENV{'PATH'};
use Bugzilla;
$::ENV{'PATH'} = $foo;

doesn't work anymore. mkanat suggested on IRC to set it manually in this script.
Note that this script is not broken yet. require "globals.pl"; does what we want for now. But neither "use Bugzilla;" nor "require Bugzilla;" work.
Blocks: bz-globals
Right. But this should work:

BEGIN {
    my $saved_path = $ENV{PATH};
    require Bugzilla;
    $ENV{PATH} = $saved_path;
}

Also, we could check for taint mode and only delete the ENV variables if we're running in taint mode. I think that might be a better idea.
Depends on: 313531
Whiteboard: [blocker will fix]
Fixed by bug 313531.
Assignee: general → LpSolit
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.