mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
FIX: missing class, backwards compatibility with PHP7.4
This commit is contained in:
parent
34a0f71edc
commit
986f9435dd
@ -35,7 +35,7 @@ class ObjectGraphQlEx extends Extension
|
||||
|
||||
//$var = URLLinkablePlugin::config()->get('single_field_name');
|
||||
$var = 'url';
|
||||
if ($curr::class === GraphQLController::class) {
|
||||
if (get_class($curr) === GraphQLController::class) {
|
||||
$vars = json_decode($curr->getRequest()->getBody(), true)['variables'];
|
||||
if (isset($vars[$var])) {
|
||||
$link = $vars[$var];
|
||||
|
@ -18,6 +18,7 @@ use SilverStripe\GraphQL\Schema\Schema;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use SilverStripe\View\SSViewer;
|
||||
use SilverStripe\View\ViewableData;
|
||||
|
||||
if (!interface_exists(ModelQueryPlugin::class)) {
|
||||
return;
|
||||
@ -219,7 +220,7 @@ class URLLinkablePlugin implements ModelQueryPlugin
|
||||
|
||||
protected static function findAction($controller, $request)
|
||||
{
|
||||
$handlerClass = $controller::class;
|
||||
$handlerClass = get_class($controller);
|
||||
|
||||
// We stop after RequestHandler; in other words, at ViewableData
|
||||
while ($handlerClass && $handlerClass != ViewableData::class) {
|
||||
|
Loading…
Reference in New Issue
Block a user