瀏覽代碼

- php : fixed php.Lib.rethrow

Franco Ponticelli 15 年之前
父節點
當前提交
32b4006c40
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 1 0
      doc/CHANGES.txt
  2. 4 2
      std/php/Lib.hx

+ 1 - 0
doc/CHANGES.txt

@@ -45,6 +45,7 @@
 	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
 	php : fixed return type for Std.string() with integers and floats
+	php : fixed php.Lib.rethrow
 
 
 2010-01-09: 2.05
 2010-01-09: 2.05
 	js : added js.Scroll
 	js : added js.Scroll

+ 4 - 2
std/php/Lib.hx

@@ -68,11 +68,13 @@ class Lib {
 	/**
 	/**
 		For neko compatibility only.
 		For neko compatibility only.
 	**/
 	**/
-	public inline static function rethrow( e : Dynamic ) {
-		untyped __php__("if(isset($»e)) throw $»e");
+	public static function rethrow( e : Dynamic ) {
 		if(Std.is(e, Exception)) {
 		if(Std.is(e, Exception)) {
 			var __rtex__ = e;
 			var __rtex__ = e;
 			untyped __php__("throw $__rtex__");
 			untyped __php__("throw $__rtex__");
+		} else if (untyped __php__("isset($»e)"))
+		{
+			untyped __php__("throw $»e");
 		}
 		}
 		else throw e;
 		else throw e;
 	}
 	}