Browse Source

[php7] fix accessing static methods of String class stored into a variable (#4667)

Alexander Kuzmenko 8 năm trước cách đây
mục cha
commit
5cf6400bee
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      std/php7/Boot.hx

+ 1 - 1
std/php7/Boot.hx

@@ -534,7 +534,7 @@ private class HxClass {
 	**/
 	@:phpMagic
 	function __call( method:String, args:NativeArray ) : Dynamic {
-		var callback = phpClassName + '::' + method;
+		var callback = (phpClassName == 'String' ? (cast HxString:HxClass).phpClassName : phpClassName) + '::' + method;
 		return Global.call_user_func_array(callback, args);
 	}