php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37914 get_include_path() doesn't whine about passing a parameter to it
Submitted: 2006-06-26 10:04 UTC Modified: 2006-06-26 10:35 UTC
From: ler at lerctr dot org Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.1.4 OS: FreeBSD 6.1/amd64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ler at lerctr dot org
New email:
PHP Version: OS:

 

 [2006-06-26 10:04 UTC] ler at lerctr dot org
Description:
------------
if you (by accident, copy/paste, whatever) pass an argument
to get_include_path(), the function just returns an empty string, and NO diagnostic is issued. 

i've placed the reproduce script (with also a link generated to a phpinfo() call) at:

http://blog.lerctr.org/php_get_include_path_bug.php

the phpinfo() is at: 

http://blog.lerctr.org/php.php



Reproduce code:
---------------
<?php
  echo "get_include_path('include_path')=" . get_include_path('include_path');
  echo "<br>";
  echo "get_include_path()=" . get_include_path();
  echo "<br>";
?>


Expected result:
----------------
the bug is illustrated with the output of the first echo.

Actual result:
--------------
a diagnostic, or ignore the parameter, and return
the include_path.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-26 10:16 UTC] tony2001@php.net
What are you talking about?

# php -r 'get_include_path("");'

Warning: Wrong parameter count for get_include_path() in Command line code on line 1

 [2006-06-26 10:18 UTC] ler at lerctr dot org
Did you actually click on the reproduce script?

It clearly doesn't do that on my box.
 [2006-06-26 10:26 UTC] ler at lerctr dot org
Ok, a warning DOES make it to the apache error_log.

but if you are using @get_include_path(), and pass a parameter, it basically silently fails.

If you want, mark it bogus, but it was a royal pain to find
the garbage code in an app that had the @get_include_path('include_path') coded.
 [2006-06-26 10:35 UTC] tony2001@php.net
Of course you won't see any errors, you've turned them off:
display_errors	Off	Off

Don't use @. Not PHP problem.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC