Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Template / Loader / ThemeRegistryLoader.php
index 67a82dd8f51ab228155905ebe38c710dabb8a928..862092b6062a0d085b99ea19d4ecc6fd71139acf 100644 (file)
@@ -36,8 +36,8 @@ class ThemeRegistryLoader extends \Twig_Loader_Filesystem {
    * @param bool $throw
    *   Whether to throw an exception when an error occurs.
    *
-   * @return string
-   *   The path to the template.
+   * @return string|false
+   *   The path to the template, or false if the template is not found.
    *
    * @throws \Twig_Error_Loader
    *   Thrown if a template matching $name cannot be found.
@@ -63,6 +63,8 @@ class ThemeRegistryLoader extends \Twig_Loader_Filesystem {
     if ($throw) {
       throw new \Twig_Error_Loader(sprintf('Unable to find template "%s" in the Drupal theme registry.', $name));
     }
+
+    return FALSE;
   }
 
 }