Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002794 [Quercus] minor always 07-17-08 15:31 07-17-08 17:09
Reporter ferg View Status public  
Assigned To nam
Priority normal Resolution no change required Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.6 Product Version 3.1.6
  Product Build
Summary 0002794: include() or die
Description (rep by tonystark)

I'd like to share the recent problem with Resin and PHP which I have.

I created very simple php file:

<?php
$file = '/opt/resinpro/webapps/dim/class.php';
include($file) or die();
?>

The error which I get is:

"/opt/resinpro/webapps/dim/index.php:2: Warning: '1' is not a valid path"

Does anybody have an idea why include() / require() don't work properly in this case on 3.1.6? Thanks in advance!
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003277)
nam
07-17-08 17:09

The current behavior is correct because "include()" is not a function call but is a special language construct.

The include parentheses are not required, which means that:

  include($file) or die()

is equivalent to:

  include $file or die()
 

- Issue History
Date Modified Username Field Change
07-17-08 15:31 ferg New Issue
07-17-08 16:57 nam Status new => assigned
07-17-08 16:57 nam Assigned To  => nam
07-17-08 17:09 nam Status assigned => closed
07-17-08 17:09 nam Note Added: 0003277
07-17-08 17:09 nam Resolution open => no change required
07-17-08 17:09 nam Fixed in Version  => 3.1.6


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker