David Mudrák 93f4f3494a MDL-53481 availability: Fix uniqueness of SQL named param placeholders
Static variables do not behave the way you might expect when accessing
them through the classes inheritance. When accessing a method via self::
or static:: operators, even though the method is inherited, its variable
scope is not. So the method unique_sql_parameter() was using the scope
of the child class and each child class had its own sequence of usp1,
usp2, usp3, ... placeholders. This led to "Incorrect number of query
parameters" error when multiuple condition classes were contributing to
a single SQL query.

All credit should go to Adam Olley who debugged and described the
essence of the problem in the tracker.
2016-11-08 13:36:07 +01:00
..