Skip to content

error in your SQL syntax with limit in restapi/includes/subscribers.php when calling subscribersGet #30

@alexandrenorman

Description

@alexandrenorman

Got this error when calling "subscribersGet":

{'type': 'Error', 'data': {'message': "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''100' OFFSET 0' at line 1", 'code': '42000'}, 'status': 'error'}

Correction proposal for subscribers.php:

32c32
<             $limit = $_REQUEST['limit'];

---
>             $limit = intval($_REQUEST['limit']);
35c35
<             $offset = $_REQUEST['offset'];

---
>             $offset = intval($_REQUEST['offset']);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions