Anonymous | Login | Signup for a new account | 12-17-2024 11:56 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ 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 | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.1.5 | Product Version | 3.1.4 | ||||
Product Build | |||||||||
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 | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |