Commit 597df4ca authored by Jérome Perrin's avatar Jérome Perrin

ZSQLCatalog: prevent memory explosion when portal_catalog.getObject(None)

parent a8a5fd52
......@@ -1026,6 +1026,7 @@ class Catalog(Folder,
# It could also have a performance impact for traversals to objects in
# the acquisition context on Zope 2.12 even when it didn't raise a weird
# error.
if not uid: return None
method = getattr(self, self.sql_getitem_by_uid)
search_result = method(uid = uid)
if len(search_result) > 0:
......
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