Commit 26f5a036 authored by Yusei Tahara's avatar Yusei Tahara

Prevent infinite loop when proxy field was broken.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18937 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 29a9f08d
......@@ -376,10 +376,16 @@ class ProxyField(ZMIField):
This result must not be a ProxyField.
"""
field = self
chain = []
while True:
template_field = field.getTemplateField()
if template_field.__class__ != ProxyField:
break
if aq_base(template_field) in chain:
LOG('ProxyField', WARNING, 'Infinite loop detected in %s.' %
'/'.join(self.getPhysicalPath()))
return
chain.append(aq_base(template_field))
field = template_field
return template_field
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment