Skip to content
Snippets Groups Projects
Unverified Commit bd65826b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3175112 follow-up by andypost, TR: hold_test module creates files in...

Issue #3175112 follow-up by andypost, TR: hold_test module creates files in incorrect place leading to possible random errors
parent 1696301d
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
* TRUE - enable hold, FALSE - disable hold.
*/
function hold_test_request($status) {
$site_path = \Drupal::getContainer()->getParameter('site.path');
$site_path = \Drupal::service('site.path');
file_put_contents($site_path . '/hold_test_request.txt', $status);
}
......@@ -23,6 +23,6 @@ function hold_test_request($status) {
* TRUE - enable hold, FALSE - disable hold.
*/
function hold_test_response($status) {
$site_path = \Drupal::getContainer()->getParameter('site.path');
$site_path = \Drupal::service('site.path');
file_put_contents($site_path . '/hold_test_response.txt', $status);
}
services:
hold_test.response:
class: Drupal\hold_test\EventSubscriber\HoldTestSubscriber
arguments: ['%site.path%']
arguments: ['@site.path']
tags:
- { name: event_subscriber }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment