{"record":{"id":"69fae8051c98c1b4","repo":"Intervention/image","slug":"invalid-pixelation-size-must-be-int-1-max","errorCode":null,"errorMessage":"Invalid pixelation size. Must be int<1, max>","messagePattern":"Invalid pixelation size\\. Must be int<1, max>","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Modifiers/PixelateModifier.php","lineNumber":18,"sourceCode":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Intervention\\Image\\Modifiers;\n\nuse Intervention\\Image\\Drivers\\SpecializableModifier;\nuse Intervention\\Image\\Exceptions\\InvalidArgumentException;\n\nclass PixelateModifier extends SpecializableModifier\n{\n    /**\n     * @throws InvalidArgumentException\n     */\n    public function __construct(public int $size)\n    {\n        if ($this->size < 1) {\n            throw new InvalidArgumentException('Invalid pixelation size. Must be int<1, max>');\n        }\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Modifiers/PixelateModifier.php#L1-L22","documentation":"Error \"Invalid pixelation size. Must be int<1, max>\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Modifiers/PixelateModifier.php:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an integer pixel size of at least 1 to pixelate()","Clamp computed sizes: max(1, (int) $size)","Validate user input so 0 or negative sizes are rejected"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}