-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
This code:
@instanceof($latest_posts_query, 'WP_Query')
{!! \App\pagination($latest_posts_query) !!}
@endinstanceof
Renders this code:
<?php if ($latest_posts_query instanceof 'WP_Query') : ?>
<?php echo \App\pagination($latest_posts_query); ?>
<?php endif; ?>
With the error of Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: syntax error, unexpected ''WP_Query'' (T_CONSTANT_ENCAPSED_STRING)
.
The documentation of this directive suggests passing the class name as a string but in fact, should be the actual instance object.
Simply removing the quotes around the second argument will fix the issue.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers