Database query fails with negative pager

Created on 28 April 2020, almost 5 years ago
Updated 20 October 2023, over 1 year ago

Problem/Motivation

1. Visit a webpage using a pager
2. Add a page query parameter with a negative value, e.g. -1539
3. Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax

Proposed resolution

Handle the error a bit more gracefully by validating the query parameter so only positive numbers are allowed.

Remaining tasks

Issue summary update - this is suitable for a novice
See #12 concerning another test to add.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Base 

Last updated about 3 hours ago

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024