summaryrefslogtreecommitdiff
path: root/php/src/IcePHP/Proxy.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-01-15 14:45:04 -0800
committerMark Spruiell <mes@zeroc.com>2009-01-15 14:45:04 -0800
commitcd75146bcf4be80cbd8b1a541e1e4dda4828a463 (patch)
tree7d9b5152c47a2ad8c6c7b0ab126f579a19102e9b /php/src/IcePHP/Proxy.cpp
parent- Fixed errorDetection test (diff)
downloadice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.tar.bz2
ice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.tar.xz
ice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.zip
- bug 3566 - PHP redefinition errors
- suppressing Slice warnings in PHP slicing/objects test
Diffstat (limited to 'php/src/IcePHP/Proxy.cpp')
-rw-r--r--php/src/IcePHP/Proxy.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/php/src/IcePHP/Proxy.cpp b/php/src/IcePHP/Proxy.cpp
index d3ba7d04bcc..38281878001 100644
--- a/php/src/IcePHP/Proxy.cpp
+++ b/php/src/IcePHP/Proxy.cpp
@@ -1821,20 +1821,20 @@ lookupClass(const string& id, Slice::ClassDefPtr& def TSRMLS_DC)
try
{
- Slice::TypeList l;
+ Slice::TypePtr type;
Profile* profile = static_cast<Profile*>(ICE_G(profile));
if(profile)
{
- l = profile->unit->lookupType(id, false);
+ type = profile->lookupType(id);
}
- if(l.empty())
+ if(!type)
{
php_error_docref(0 TSRMLS_CC, E_ERROR, "no Slice definition found for type %s", id.c_str());
return false;
}
- Slice::BuiltinPtr b = Slice::BuiltinPtr::dynamicCast(l.front());
+ Slice::BuiltinPtr b = Slice::BuiltinPtr::dynamicCast(type);
if(b && b->kind() != Slice::Builtin::KindObject && b->kind() != Slice::Builtin::KindObjectProxy)
{
php_error_docref(0 TSRMLS_CC, E_ERROR, "type %s is not a class or interface", id.c_str());
@@ -1847,7 +1847,6 @@ lookupClass(const string& id, Slice::ClassDefPtr& def TSRMLS_DC)
// Allow the use of "::Type" (ClassDecl) or "::Type*" (Proxy).
//
Slice::ClassDeclPtr decl;
- Slice::TypePtr type = l.front();
Slice::ProxyPtr proxy = Slice::ProxyPtr::dynamicCast(type);
if(proxy)
{