Browse Source

- php : fixed return type for Std.string() with integers and floats

Franco Ponticelli 15 years ago
parent
commit
d878c500c8
2 changed files with 2 additions and 1 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 1 1
      std/php/Boot.hx

+ 1 - 0
doc/CHANGES.txt

@@ -44,6 +44,7 @@
 	php : enhanced FileInput.readLine using native fgets function (issue 103)
 	php : enhanced FileInput.readLine using native fgets function (issue 103)
 	flash9 : renamed flash.Error to flash.errors.Error
 	flash9 : renamed flash.Error to flash.errors.Error
 	php : removed eval() everywhere and simplified _hx_lambda
 	php : removed eval() everywhere and simplified _hx_lambda
+	php : fixed return type for Std.string() with integers and floats
 
 
 2010-01-09: 2.05
 2010-01-09: 2.05
 	js : added js.Scroll
 	js : added js.Scroll

+ 1 - 1
std/php/Boot.hx

@@ -495,7 +495,7 @@ function _hx_string_call($s, $method, $params) {
 function _hx_string_rec($o, $s) {
 function _hx_string_rec($o, $s) {
 	if($o === null)                return 'null';
 	if($o === null)                return 'null';
 	if(strlen($s) >= 5)            return '<...>';
 	if(strlen($s) >= 5)            return '<...>';
-	if(is_int($o) || is_float($o)) return $o;
+	if(is_int($o) || is_float($o)) return '' . $o;
 	if(is_bool($o))                return $o ? 'true' : 'false';
 	if(is_bool($o))                return $o ? 'true' : 'false';
 	if(is_object($o)) {
 	if(is_object($o)) {
 		$c = get_class($o);
 		$c = get_class($o);