{"record":{"id":"5c6b7664f8421b56","repo":"Seldaek/monolog","slug":"the-curl-extension-is-needed-to-use-the-ifttthandl","errorCode":null,"errorMessage":"The curl extension is needed to use the IFTTTHandler","messagePattern":"The curl extension is needed to use the IFTTTHandler","errorType":"exception","errorClass":"MissingExtensionException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/IFTTTHandler.php","lineNumber":43,"sourceCode":" * value3 will be the log record's message\n *\n * @author Nehal Patel <nehal@nehalpatel.me>\n */\nclass IFTTTHandler extends AbstractProcessingHandler\n{\n    private string $eventName;\n    private string $secretKey;\n\n    /**\n     * @param string $eventName The name of the IFTTT Maker event that should be triggered\n     * @param string $secretKey A valid IFTTT secret key\n     *\n     * @throws MissingExtensionException If the curl extension is missing\n     */\n    public function __construct(string $eventName, string $secretKey, int|string|Level $level = Level::Error, bool $bubble = true)\n    {\n        if (!\\extension_loaded('curl')) {\n            throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler');\n        }\n\n        $this->eventName = $eventName;\n        $this->secretKey = $secretKey;\n\n        parent::__construct($level, $bubble);\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function write(LogRecord $record): void\n    {\n        $postData = [\n            \"value1\" => $record->channel,\n            \"value2\" => $record[\"level_name\"],\n            \"value3\" => $record->message,\n        ];","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/IFTTTHandler.php#L25-L61","documentation":"Error \"The curl extension is needed to use the IFTTTHandler\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/IFTTTHandler.php:43 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":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}