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

8.0.x
Alex Pott 2015-04-03 14:11:04 +01:00
parent 854cfcfad7
commit 9fdbd3986d
2 changed files with 2 additions and 4 deletions

View File

@ -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());

View File

@ -1135,7 +1135,7 @@ class Sql extends QueryPluginBase {
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);
}