{"record":{"id":"f0460bf831116721","repo":"filp/whoops","slug":"length-length-cannot-be-lower-or-equal-to-0","errorCode":null,"errorMessage":"$length($length) cannot be lower or equal to 0","messagePattern":"\\$length\\(\\$length\\) cannot be lower or equal to 0","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Whoops/Exception/Frame.php","lineNumber":212,"sourceCode":"     * @param  int                      $start\n     * @param  int                      $length\n     * @return string[]|null\n     */\n    public function getFileLines($start = 0, $length = null)\n    {\n        if (null !== ($contents = $this->getFileContents())) {\n            $lines = explode(\"\\n\", $contents);\n\n            // Get a subset of lines from $start to $end\n            if ($length !== null) {\n                $start  = (int) $start;\n                $length = (int) $length;\n                if ($start < 0) {\n                    $start = 0;\n                }\n\n                if ($length <= 0) {\n                    throw new InvalidArgumentException(\n                        \"\\$length($length) cannot be lower or equal to 0\"\n                    );\n                }\n\n                $lines = array_slice($lines, $start, $length, true);\n            }\n\n            return $lines;\n        }\n    }\n\n    /**\n     * Implements the Serializable interface, with special\n     * steps to also save the existing comments.\n     *\n     * @see Serializable::serialize\n     * @return string\n     */","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/filp/whoops/blob/fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7/src/Whoops/Exception/Frame.php#L194-L230","documentation":"Error \"$length($length) cannot be lower or equal to 0\" thrown in filp/whoops.","triggerScenarios":"Thrown at src/Whoops/Exception/Frame.php:212 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":"fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7","analyzedAt":"2026-08-21T01:30:26.400Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}