Sfoglia il codice sorgente

[php] changed _hx_cast() to use _hx_instancof() instead of Std.is() to avoid handling php-prefix (fixes #6083)

Alexander Kuzmenko 8 anni fa
parent
commit
3b4c33024c
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      std/php/Boot.hx
  2. 1 1
      std/php/_std/Std.hx

+ 1 - 1
std/php/Boot.hx

@@ -267,7 +267,7 @@ function _hx_array_assign($a, $i, $v) { return $a[$i] = $v; }
 class _hx_break_exception extends Exception {}
 
 function _hx_cast($v, $type) {
-	if(Std::is($v, $type)) {
+	if(_hx_instanceof($v, $type)) {
 		return $v;
 	} else {
 		throw new HException('Class cast error');

+ 1 - 1
std/php/_std/Std.hx

@@ -22,7 +22,7 @@
 @:coreApi class Std {
 
 	public static function is( v : Dynamic, t : Dynamic ) : Bool {
-		return untyped untyped __call__("_hx_instanceof", v,t);
+		return untyped __call__("_hx_instanceof", v,t);
 	}
 
 	public static function instance<T:{},S:T>( value : T, c : Class<S> ) : S {