2
0
Эх сурвалжийг харах

Fix Reflect.deleteField() on php target

Wrong parameters were passed to the php output
Eric Priou 12 жил өмнө
parent
commit
8e650e446b

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

@@ -99,7 +99,7 @@
 		
 		
 	public static function deleteField( o : Dynamic, field : String ) : Bool {
 	public static function deleteField( o : Dynamic, field : String ) : Bool {
 		if(!hasField(o,field)) return false;
 		if(!hasField(o,field)) return false;
-		untyped __php__("if(isset($o->__dynamics[$field])) unset($o->__dynamics[$field]); else if($o instanceof _hx_anonymous) unset($o->$f); else $o->$f = null");
+		untyped __php__("if(isset($o->__dynamics[$field])) unset($o->__dynamics[$field]); else if($o instanceof _hx_anonymous) unset($o->$field); else $o->$field = null");
 		return true;
 		return true;
 	}
 	}