Skip to content

Commit 73a6142

Browse files
committed
MC-19918: Introduce scalar variables only mode to E-mail templates
1 parent 537df47 commit 73a6142

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testProcess()
7171
$this->observer->process();
7272
$this->assertContains(
7373
'ohn Smith,',
74-
$transportBuilder->getSentMessage()->getRawMessage()
74+
$this->transportBuilder->getSentMessage()->getRawMessage()
7575
);
7676
}
7777

lib/internal/Magento/Framework/Filter/Template.php

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -364,45 +364,6 @@ protected function getVariable($value, $default = '{no_value_defined}')
364364
return $result;
365365
}
366366

367-
/**
368-
* Evaluate object property access.
369-
*
370-
* @param object $object
371-
* @param string $property
372-
* @return null
373-
*/
374-
private function evaluateObjectPropertyAccess($object, $property)
375-
{
376-
$method = 'get' . $this->string->upperCaseWords($property, '_', '');
377-
$this->validateVariableMethodCall($object, $method);
378-
return method_exists($object, $method)
379-
? $object->{$method}()
380-
: (($object instanceof \Magento\Framework\DataObject) ? $object->getData($property) : null);
381-
}
382-
383-
/**
384-
* Evaluate object method call.
385-
*
386-
* @param object $object
387-
* @param string $method
388-
* @param array $arguments
389-
* @return mixed|null
390-
*/
391-
private function evaluateObjectMethodCall($object, $method, $arguments)
392-
{
393-
if (method_exists($object, $method)
394-
|| ($object instanceof \Magento\Framework\DataObject && substr($method, 0, 3) == 'get')
395-
) {
396-
$arguments = $this->getStackArgs($arguments);
397-
$this->validateVariableMethodCall($object, $method);
398-
return call_user_func_array(
399-
[$object, $method],
400-
$arguments
401-
);
402-
}
403-
return null;
404-
}
405-
406367
/**
407368
* Loops over a set of stack args to process variables into array argument values
408369
*

0 commit comments

Comments
 (0)