Error:

The website encountered an unexpected error. Please try again later.

2017/06/22 17:47:06 [error] 26805#26805: *537 FastCGI sent in stderr: "PHP message: Error: Using $this when not in object context in /web/modules/contrib/tac_lite/tac_lite_create/tac_lite_create.module on line 30 #0 /var/www/drupal8/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): tac_lite_create_form_alter(Array, Object(Drupal\Core\Form\FormState), 'tac_lite_admin_...')
#1 /web/core/lib/Drupal/Core/Form/FormBuilder.php(819): Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object(Drupal\Core\Form\FormState), 'tac_lite_admin_...')
#2 /web/core/lib/Drupal/Core/Form/FormBuilder.php(272): Drupal\Core\Form\FormBuilder->prepareForm('tac_lite_admin_...', Array, Object(Drupal\Core\Form\FormState))
#3 /web/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('tac_lite_admin_...', Object(Drupal\Core\Form\FormState))
#4 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Co" while reading response header from upstream, client: 192.168.0.7, server: drupal8b.my, request: "GET /admin/config/people/tac_lite/scheme_1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "drupal8a.my", referrer: "http://drupal8a.my/admin/config/people/tac_lite"

$this-> is used for the t() when $this is null;

File:
tac_lite_create/tac_lite_create.module line 30

The attached patch simply removes $this and calls t() directly.

Comments

tseven created an issue. See original summary.

tseven’s picture

  • mukila committed b66804f on 8.x-1.x
    Issue #2888660 by tseven: Error: Using $this when not in object context...

mukila credited mukila.

mukila’s picture

Status: Patch (to be ported) » Fixed

Updated this change in 8.x-1.2 version

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.