{"record":{"id":"6b89bb4165f72bd5","repo":"Intervention/image","slug":"you-must-specify-either-3-or-4-points-to-create-a-6b89bb","errorCode":null,"errorMessage":"You must specify either 3 or 4 points to create a bezier curve","messagePattern":"You must specify either 3 or 4 points to create a bezier curve","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Modifiers/DrawBezierModifier.php","lineNumber":92,"sourceCode":"            $this->drawable->first()->y(),\n        );\n\n        match ($this->drawable->count()) {\n            3 => $bezierCurve->pathCurveToQuadraticBezierAbsolute(\n                $this->drawable->second()->x(),\n                $this->drawable->second()->y(),\n                $this->drawable->last()->x(),\n                $this->drawable->last()->y(),\n            ),\n            4 => $bezierCurve->pathCurveToAbsolute(\n                $this->drawable->second()->x(),\n                $this->drawable->second()->y(),\n                $this->drawable->third()->x(),\n                $this->drawable->third()->y(),\n                $this->drawable->last()->x(),\n                $this->drawable->last()->y(),\n            ),\n            default => throw new InvalidArgumentException(\n                'You must specify either 3 or 4 points to create a bezier curve',\n            ),\n        };\n\n        $bezierCurve->pathFinish();\n\n        return $bezierCurve;\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":102,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Modifiers/DrawBezierModifier.php#L74-L102","documentation":"Error \"You must specify either 3 or 4 points to create a bezier curve\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide either 3 points (quadratic bezier) or 4 points (cubic bezier) in the points array","Build the points array with instances of Intervention\\Image\\Geometry\\Point, e.g. new Point(0, 0)","Remove any null or non-point entries from the points array before calling the modifier"],"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"}