Anonymous | Login | Signup for a new account | 12-17-2024 08:44 PST |
Main | My View | View Issues | Change Log | Docs |
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 | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |