Commit 9fdbd398 authored by alexpott's avatar alexpott

Issue #2465009 by Berdir: Fix fatal errors in rest and views with PHP 7

parent 854cfcfa
......@@ -31,13 +31,11 @@ class RequestHandler implements ContainerAwareInterface {
* The route match.
* @param \Symfony\Component\HttpFoundation\Request $request
* The HTTP request object.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
*
* @return \Symfony\Component\HttpFoundation\Response
* The response object.
*/
public function handle(RouteMatchInterface $route_match, Request $request, RouteMatchInterface $route_match) {
public function handle(RouteMatchInterface $route_match, Request $request) {
$plugin = $route_match->getRouteObject()->getDefault('_plugin');
$method = strtolower($request->getMethod());
......
......@@ -1135,7 +1135,7 @@ protected function compileFields($query) {
if (!empty($field['function'])) {
$info = $this->getAggregationInfo();
if (!empty($info[$field['function']]['method']) && is_callable(array($this, $info[$field['function']]['method']))) {
$string = $this::$info[$field['function']]['method']($field['function'], $string);
$string = $this::{$info[$field['function']]['method']}($field['function'], $string);
$placeholders = !empty($field['placeholders']) ? $field['placeholders'] : array();
$query->addExpression($string, $fieldname, $placeholders);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment