{"record":{"id":"e63b01911a63c975","repo":"octobercms/october","slug":"current-page-must-be-zero-or-a-positive-integer","errorCode":null,"errorMessage":"Current page must be zero or a positive integer","messagePattern":"Current page must be zero or a positive integer","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/classes/ReportDataPaginationParams.php","lineNumber":25,"sourceCode":" */\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    }\n\n    /**\n     * Returns the current page value\n     * @return int","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/classes/ReportDataPaginationParams.php#L7-L43","documentation":"Error \"Current page must be zero or a positive integer\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/dashboard/classes/ReportDataPaginationParams.php:25 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"}