Skip to content

Set empty limit to "" in serendipity_fetchEntries.

onli requested to merge github/fork/th-h/thh-limit into master

Created by: th-h

If $limit is empty(), no limit is set, so we can set the LIMIT statement to "" to achieve the same.

But an empty() $limit can be "0", so the generated SQL statement could end with "0" instead of the LIMIT statement. We catch this with forcing an empty() $limit to "".

Fixes #636 (closed). (No matter that this shouldn't even happen.)

Signed-off-by: Thomas Hochstein thh@inter.net

Merge request reports