cvs: php4 /ext/java/ reflect.java

[email protected] ("Sam Ruby")
Newsgroups php.version4
Message-ID <cvsrubys958908287@cvsserver>
rubys		Sun May 21 13:24:47 2000 EDT

  Modified files:
    /php4/ext/java	reflect.java 
  Log:
  passing Strings as Objects
  
Index: php4/ext/java/reflect.java
diff -u php4/ext/java/reflect.java:1.8 php4/ext/java/reflect.java:1.9
--- php4/ext/java/reflect.java:1.8	Fri May 12 11:51:15 2000
+++ php4/ext/java/reflect.java	Sun May 21 13:24:47 2000
@@ -201,8 +201,7 @@
   private static Object[] coerce(Class parms[], Object args[]) {
     Object result[] = args;
     for (int i=0; i<args.length; i++) {
-      if (parms[i].isInstance(args[i])) continue;
-      if (args[i] instanceof byte[] && parms[i].isInstance("")) {
+      if (args[i] instanceof byte[] && !parms[i].isArray()) {
         result[i] = new String((byte[])args[i]);
       } else if (args[i] instanceof Number && parms[i].isPrimitive()) {
         if (result==args) result=(Object[])result.clone();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.