Bug #55193 [Opn->Bgs]: virtual() loop with null parameter

From: Date: Sat, 17 Sep 2011 09:12:00 +0000
Subject: Bug #55193 [Opn->Bgs]: virtual() loop with null parameter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-163632@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55193&edit=1

 ID:                 55193
 Updated by:         nikic@php.net
 Reported by:        jinmoku at hotmail dot com
 Summary:            virtual() loop with null parameter
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Apache2 related
 Operating System:   OSX 10.6
 PHP Version:        5.4.0alpha1
 Block user comment: N
 Private report:     N

 New Comment:

As far as I see it this is expected behavior.

I'm assuming that you are running the file as index.php and thus the same file get's
included again and again, recursively. Apache stops the recursive inclusion after 10 subrequests,
which is the default value for LimitInternalRecursion.

PHP does not prevent recursive subrequests by itself as they are useful as long as you break out of
the recursion at some point. For the same reason you can also include/require a file recursively.


Previous Comments:
------------------------------------------------------------------------
[2011-07-12 15:04:15] jinmoku at hotmail dot com

Description:
------------
virtual() loop with null parameter, loop 9 times before it stop

Test script:
---------------
var_dump('test');
virtual(null); // or virtual('');

Expected result:
----------------
string(4) "test"

Warning: virtual(): Unable to include '' - error finding URI


Actual result:
--------------
string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

string(4) "test"

Warning: virtual(): Unable to include '' - error finding URI



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



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


Thread (2 messages)

« previous php.bugs (#163632) next »