{"record":{"id":"d4eda453e18e0cdb","repo":"Intervention/image","slug":"failed-to-build-bezier-curve","errorCode":null,"errorMessage":"Failed to build bezier curve","messagePattern":"Failed to build bezier curve","errorType":"exception","errorClass":"ModifierException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Modifiers/DrawBezierModifier.php","lineNumber":53,"sourceCode":"\n        foreach ($image as $frame) {\n            $this->draw($frame->native(), $bezierCurve);\n        }\n\n        return $image;\n    }\n\n    /**\n     * @throws InvalidArgumentException\n     * @throws ModifierException\n     */\n    private function bezierCurve(ImagickPixel $backgroundColor, ImagickPixel $borderColor): ImagickDraw\n    {\n        try {\n            $bezierCurve = new ImagickDraw();\n            $bezierCurve->setFillColor($backgroundColor);\n        } catch (ImagickDrawException $e) {\n            throw new ModifierException(\n                'Failed to build bezier curve',\n                previous: $e,\n            );\n        }\n\n        if ($this->drawable->hasBorder() && $this->drawable->borderSize() > 0) {\n            try {\n                $bezierCurve->setStrokeColor($borderColor);\n                $bezierCurve->setStrokeWidth($this->drawable->borderSize());\n            } catch (ImagickDrawException $e) {\n                throw new ModifierException(\n                    'Failed to build bezier curve',\n                    previous: $e,\n                );\n            }\n        }\n\n        $bezierCurve->pathStart();","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Modifiers/DrawBezierModifier.php#L35-L71","documentation":"Error \"Failed to build bezier curve\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Drivers/Imagick/Modifiers/DrawBezierModifier.php:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly 3 or 4 points to the bezier drawing callable so the curve can be constructed","Ensure every point is an Intervention\\Image\\Geometry\\Point with numeric x and y coordinates","Check the ImagickDraw path functions (pathCurveToQuadraticBezier/pathCurveTo) are available in the installed imagick version"],"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"}