Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005769 [Quercus] minor always 07-04-14 09:47 07-04-14 09:47
Reporter tobia View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0005769: substr() with a negative 2nd argument larger than the string length
Description This affects the latest 4.0.39, but I couldn't find it in the version popup.

In vanilla PHP, calling substr() with a negative 2nd argument whose absolute value is larger than the string length results in the entire string being returned. Quercus returns false. Compare:

    var_export(substr("FooBar", -50));

This outputs 'FooBar' in vanilla PHP, but false in Quercus.

This is breaking Doctrine, see http://www.doctrine-project.org/api/orm/2.3/source-class-Doctrine.ORM.Mapping.DefaultQuoteStrategy.html#134 [^]
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
07-04-14 09:47 tobia New Issue


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