ID:               21499
 Updated by:       [EMAIL PROTECTED]
-Summary:          include 'bogus' gives unfriendly error
 Reported By:      [EMAIL PROTECTED]
-Status:           Won't fix
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: all
 PHP Version:      4.3.0
 New Comment:

The fact that it provides two 404 links to a non-existent PHP function
named main() is rather misleading and is not reasonable.  I didn't
call/use any function named main(), I used include().  Fact is,
include() could not include the file because the file could not be
opened.  Simply "Failed opening foo for inclusion" is enough, like it
used to be before php_error_docref.  Linking to function.include would
be fine too.

IMHO this should remain open until someone fixes it.  I would put
php_error_docref in the summary but I really don't know the internals
or if that's the problem.


Previous Comments:
------------------------------------------------------------------------

[2003-01-07 17:36:43] [EMAIL PROTECTED]

Since include is not a function but rather a language construct this is
unlikely to be ever fixed.
The error as is, imo is reasonably descriptive as it tells what action
had failed and why.

------------------------------------------------------------------------

[2003-01-07 14:28:43] [EMAIL PROTECTED]

This isn't a feature request Nicos, this is a bug.  It refers/links to
a non-existent function/page in the error.

------------------------------------------------------------------------

[2003-01-07 14:15:48] [EMAIL PROTECTED]

Reclassifing.

------------------------------------------------------------------------

[2003-01-07 14:02:01] [EMAIL PROTECTED]

<?php include 'foo' ?>

Warning: main(foo) [function.main]: 
  failed to create stream: No such file or directory in...

Warning: main() [function.main]: Failed opening 'foo' for inclusion
(include_path='.') in...

Basically, this error could be a little nicer and in the very least
link to function.include and not a non-existent function.main.

This is the case with all the include/require constructs.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21499&edit=1

Reply via email to