diff options
Diffstat (limited to 'php/src/IcePHP/Proxy.cpp')
-rw-r--r-- | php/src/IcePHP/Proxy.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/php/src/IcePHP/Proxy.cpp b/php/src/IcePHP/Proxy.cpp index 81c297b2ab0..38281878001 100644 --- a/php/src/IcePHP/Proxy.cpp +++ b/php/src/IcePHP/Proxy.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -1307,7 +1307,7 @@ ZEND_FUNCTION(Ice_ObjectPrx_ice_router) Ice::RouterPrx router; if(proxy) { - if(!def || !def->isA("Ice::Router")) + if(!def || !def->isA("::Ice::Router")) { php_error_docref(0 TSRMLS_CC, E_ERROR, "ice_router requires a proxy narrowed to Ice::Router"); RETURN_NULL(); @@ -1398,7 +1398,7 @@ ZEND_FUNCTION(Ice_ObjectPrx_ice_locator) Ice::LocatorPrx locator; if(proxy) { - if(!def || !def->isA("Ice::Locator")) + if(!def || !def->isA("::Ice::Locator")) { php_error_docref(0 TSRMLS_CC, E_ERROR, "ice_locator requires a proxy narrowed to Ice::Locator"); RETURN_NULL(); @@ -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) { |