Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / book / src / Controller / BookController.php
index b92c3e3fcfeb7904f4ce9afcf7e3576055686a47..fa34d927112860e5ecfa587bc3d09474e673e042 100644 (file)
@@ -154,7 +154,7 @@ class BookController extends ControllerBase {
 
     // @todo Convert the custom export functionality to serializer.
     if (!method_exists($this->bookExport, $method)) {
-      drupal_set_message(t('Unknown export format.'));
+      $this->messenger()->addStatus(t('Unknown export format.'));
       throw new NotFoundHttpException();
     }