Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002973 [Quercus] minor always 09-27-08 20:16 10-02-08 13:35
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version 3.2.1
  Product Build
Summary 0002973: Call-time pass by reference returns screwy results from substr()
Description Found this one in some third-party code. The code is technically not really correct, but Quercus fails strangely:

<?php
$foo = "test me";
$bar = substr(&$foo, 3, 3);
print $bar;

Vanilla PHP prints "t m", and logs a warning about pass-by-reference. Quercus prints ".ca" which I suspect is really just random junk (though it seems to be the same junk every time I run the test.)
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003477)
koreth
09-27-08 20:16

If you take away the "&" this returns the correct value in Quercus.
 
(0003486)
nam
10-02-08 13:35

php/0c4n
 

- Issue History
Date Modified Username Field Change
09-27-08 20:16 koreth New Issue
09-27-08 20:16 koreth Note Added: 0003477
10-02-08 09:22 nam Status new => assigned
10-02-08 09:22 nam Assigned To  => nam
10-02-08 13:35 nam Status assigned => closed
10-02-08 13:35 nam Note Added: 0003486
10-02-08 13:35 nam Resolution open => fixed
10-02-08 13:35 nam Fixed in Version  => 3.2.1


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