Issue #2465009 by Berdir: Fix fatal errors in rest and views with PHP 7
parent
854cfcfad7
commit
9fdbd3986d
|
@ -31,13 +31,11 @@ class RequestHandler implements ContainerAwareInterface {
|
||||||
* The route match.
|
* The route match.
|
||||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||||
* The HTTP request object.
|
* The HTTP request object.
|
||||||
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
|
|
||||||
* The route match.
|
|
||||||
*
|
*
|
||||||
* @return \Symfony\Component\HttpFoundation\Response
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
* The response object.
|
* 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');
|
$plugin = $route_match->getRouteObject()->getDefault('_plugin');
|
||||||
$method = strtolower($request->getMethod());
|
$method = strtolower($request->getMethod());
|
||||||
|
|
|
@ -1135,7 +1135,7 @@ class Sql extends QueryPluginBase {
|
||||||
if (!empty($field['function'])) {
|
if (!empty($field['function'])) {
|
||||||
$info = $this->getAggregationInfo();
|
$info = $this->getAggregationInfo();
|
||||||
if (!empty($info[$field['function']]['method']) && is_callable(array($this, $info[$field['function']]['method']))) {
|
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();
|
$placeholders = !empty($field['placeholders']) ? $field['placeholders'] : array();
|
||||||
$query->addExpression($string, $fieldname, $placeholders);
|
$query->addExpression($string, $fieldname, $placeholders);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue