Skip to content

Commit b3fcce9

Browse files
authored
Merge pull request #49 from wave-framework/twig-bug
Fix twig regression
2 parents 87055af + 94b554d commit b3fcce9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/Wave/Controller.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,15 @@ protected function _buildPayload($status, $message = '', $payload = null) {
193193
}
194194

195195
protected function _buildDataSet() {
196-
$this->_setTemplatingGlobals();
196+
$request_properties = [
197+
'input' => $this->_sanitized ?? $this->_data,
198+
'errors' => $this->_input_errors ?? array(),
199+
'_identity' => $this->_identity
200+
];
201+
197202
$properties = $this->_getResponseProperties();
198-
return array_merge($properties);
203+
204+
return array_merge($request_properties, $properties);
199205
}
200206

201207
protected function _getResponseProperties() {
@@ -209,12 +215,6 @@ protected function _getResponseProperties() {
209215
return $payload;
210216
}
211217

212-
protected function _setTemplatingGlobals() {
213-
View::registerGlobal('input', isset($this->_sanitized) ? $this->_sanitized : $this->_data);
214-
View::registerGlobal('errors', isset($this->_input_errors) ? $this->_input_errors : array());
215-
View::registerGlobal('_identity', $this->_identity);
216-
}
217-
218218
protected function respond($payload = null) {
219219
if($this->_invoke_method === self::INVOKE_SUB_REQUEST) {
220220
if($payload !== null) {

0 commit comments

Comments
 (0)