Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002254 [Quercus] minor always 12-13-07 14:21 12-17-07 08:24
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.4
Summary 0002254: Can't call array_key_exists() on a Java Map
Description f Java code returns a Map object, PHP code can't call array_key_exists() on it; an UnsupportedOperationException is thrown. It's because containsKey() isn't implemented in JavaMapAdapter. The fix is trivial.


--- a/modules/quercus/src/com/caucho/quercus/env/JavaMapAdapter.java
+++ b/modules/quercus/src/com/caucho/quercus/env/JavaMapAdapter.java
@@ -141,7 +141,16 @@ public class JavaMapAdapter
    else
      return UnsetValue.UNSET;
  }
-
+
+ /**
+ * Returns true if the map contains a key.
+ */
+ @Override
+ public BooleanValue containsKey(Value key)
+ {
+ return BooleanValue.create(_map.containsKey(key.toJavaObject()));
+ }
+
  /**
   * Removes a value.
   */
Additional Information
Attached Files

- Relationships

- Notes
(0002578)
ferg
12-17-07 08:24

php/0cfr
 

- Issue History
Date Modified Username Field Change
12-13-07 14:21 koreth New Issue
12-17-07 08:24 ferg Note Added: 0002578
12-17-07 08:24 ferg Assigned To  => ferg
12-17-07 08:24 ferg Status new => closed
12-17-07 08:24 ferg Resolution open => fixed
12-17-07 08:24 ferg Fixed in Version  => 3.1.5


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker