|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2254 | minor | always | 12-13-07 14:21 | 12-17-07 08:24 | |
|
|
|||||
| Reporter: | koreth | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.4 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.1.5 | ||
|
|
|||||
| 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. */ |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||