{"record":{"id":"3e394093c026a0e1","repo":"octobercms/october","slug":"records-per-page-must-be-a-positive-integer","errorCode":null,"errorMessage":"Records per page must be a positive integer","messagePattern":"Records per page must be a positive integer","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/classes/ReportDataPaginationParams.php","lineNumber":21,"sourceCode":"use ApplicationException;\n\n/**\n * ReportDataPaginationParams defines pagination parameters for a data source query\n */\nclass ReportDataPaginationParams\n{\n    private $recordsPerPage;\n    private $currentPage;\n\n    /**\n     * Creates a pagination parameters object.\n     * @param int $recordsPerPage Specifies the number of records per page.\n     * @param int $currentPage Specifies the current page index.\n     */\n    public function __construct(int $recordsPerPage, int $currentPage)\n    {\n        if ($recordsPerPage <= 0) {\n            throw new ApplicationException('Records per page must be a positive integer');\n        }\n\n        if ($currentPage < 0) {\n            throw new ApplicationException('Current page must be zero or a positive integer');\n        }\n\n        $this->recordsPerPage = $recordsPerPage;\n        $this->currentPage = $currentPage;\n    }\n\n    /**\n     * Returns the records per page value\n     * @return int\n     */\n    public function getRecordsPerPage(): int\n    {\n        return $this->recordsPerPage;\n    }","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/classes/ReportDataPaginationParams.php#L3-L39","documentation":"Error \"Records per page must be a positive integer\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/dashboard/classes/ReportDataPaginationParams.php:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}