Commit b0341f85 authored by Duro Arezina's avatar Duro Arezina Committed by Duro Arezina
Browse files

Issue #3256066 by devad: Fatal error caused by #3255912 commit

parent 293b8d34
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -16,6 +16,14 @@ class RequireOnce {

  use StringTranslationTrait;

  /**
   * The dummy constructor.
   *
   * All we need from this service class is the helper function below.
   */
  public function __construct() {
  }

  /**
   * The helper function for Ludwig integration.
   *
@@ -26,7 +34,7 @@ class RequireOnce {
   * @param string $dir_name
   *   The caller module directory name.
   */
  public function __construct($package_name, $file_to_require, $dir_name) {
  public function requireOnce($package_name, $file_to_require, $dir_name) {
    $ludwig_json = $dir_name . '/ludwig.json';
    if (file_exists($ludwig_json)) {
      $packages = file_get_contents($ludwig_json);