What would you check for? $1 is a text so it will either have a value or be an empty string -- both of which can be queried for. And testing the length of the entity selection prior to trying to access the first() element prevents another runtime error if the query returned nothing.
It's also annoying that an error handler is running, yet a runtime error appears instead of calling the error method. Also the lack of a call chain makes this really hard to track down. It failed once in two days (this is a "workhorse" method that gets called all the time). The old Begin SQL/End SQL version never failed as far as I know. > On Jul 27, 2018, at 2:42 PM, Kirk Brooks via 4D_Tech <[email protected]> > wrote: > > I'd add a check to the item ID string. ORDA is excruciatingly picky in > terms of inputs. I bet something is not completely kosher in an item id and > that's causing the RT error. > > Alternatively you could loop through the list of items and check the id > there. But if the param is generated or user entered I'd look at that > first. ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

