{"record":{"id":"f230258d9f33b53b","repo":"doctrine/orm","slug":"option-max-result-must-contain-an-integer-value","errorCode":null,"errorMessage":"Option 'max-result' must contain an integer value","messagePattern":"Option 'max-result' must contain an integer value","errorType":"console","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Tools/Console/Command/RunDqlCommand.php","lineNumber":100,"sourceCode":"                $hydrationModeName,\n            ));\n        }\n\n        $query = $em->createQuery($dql);\n\n        $firstResult = $input->getOption('first-result');\n        if ($firstResult !== null) {\n            if (! is_numeric($firstResult)) {\n                throw new LogicException(\"Option 'first-result' must contain an integer value\");\n            }\n\n            $query->setFirstResult((int) $firstResult);\n        }\n\n        $maxResult = $input->getOption('max-result');\n        if ($maxResult !== null) {\n            if (! is_numeric($maxResult)) {\n                throw new LogicException(\"Option 'max-result' must contain an integer value\");\n            }\n\n            $query->setMaxResults((int) $maxResult);\n        }\n\n        if ($input->getOption('show-sql')) {\n            $ui->text($query->getSQL());\n\n            return 0;\n        }\n\n        $resultSet = $query->execute([], constant($hydrationMode));\n\n        $ui->text(Debug::dump($resultSet, (int) $input->getOption('depth')));\n\n        return 0;\n    }\n}","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/doctrine/orm/blob/d9b9ff73016bf598ae07515f97289ce8074e97a5/src/Tools/Console/Command/RunDqlCommand.php#L82-L118","documentation":"Error \"Option 'max-result' must contain an integer value\" thrown in doctrine/orm.","triggerScenarios":"Thrown at src/Tools/Console/Command/RunDqlCommand.php:100 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":"d9b9ff73016bf598ae07515f97289ce8074e97a5","analyzedAt":"2026-08-21T06:13:15.863Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}