diff --git a/src/Extensions/PdfExportControllerExtension.php b/src/Extensions/PdfExportControllerExtension.php index 342013b..4e7057a 100644 --- a/src/Extensions/PdfExportControllerExtension.php +++ b/src/Extensions/PdfExportControllerExtension.php @@ -2,6 +2,7 @@ namespace CWP\PDFExport\Extensions; +use JetBrains\PhpStorm\Deprecated; use SilverStripe\Assets\Filesystem; use SilverStripe\Control\Director; use SilverStripe\Control\HTTPRequest; @@ -90,7 +91,9 @@ public function generatePDF() return false; } - $binaryPath = $this->owner->data()->config()->get('wkhtmltopdf_binary'); + $binaryPath = Deprecation::withNoReplacement(function () { + return $this->owner->data()->config()->get('wkhtmltopdf_binary'); + }); if ($binaryPath) { Deprecation::notice('3.0', 'wkhtmltopdf_binary config is deprecated. '. 'Use WKHTMLTOPDF_BINARY env var instead.');