ErrorException

HTTP 500 Whoops, looks like something went wrong.

Warning: Attempt to read property "nodeValue" on null

Exception

ErrorException

Show exception properties
ErrorException {#13097
  #severity: E_WARNING
}
  1. }
  2. //Get the current page text and href
  3. $items = new DOMXpath($dom);
  4. $dom = $items->query('//*[contains(@class, "breadcrumb_last")]');
  5. $crumb[] = array('text' => $dom->item(0)->nodeValue, 'href' => trailingslashit(home_url($wp->request)));
  6. return $crumb;
  7. }
  8. return [];
  9. }
  1. public static function addBreadcrumb()
  2. {
  3. $ListItems = [];
  4. $Iterator = 1;
  5. foreach (self::get_crumb_array() as $crumb) {
  6. $ListItem = [
  7. "@type" => "ListItem",
  8. "position" => $Iterator,
  9. "name" => $crumb["text"],
  10. "item" => $crumb["href"]
  1. public static function addBreadcrumbs()
  2. {
  3. self::addCustom([
  4. "@context" => "http://schema.org",
  5. "@type" => "BreadcrumbList",
  6. "itemListElement" => self::addBreadcrumb(),
  7. ]);
  8. }
  9. public static function addBreadcrumb()
  10. {
  1. }
  2. protected function modifyContext(): array
  3. {
  4. SchemaGenerator::addSite();
  5. SchemaGenerator::addBreadcrumbs();
  6. SchemaGenerator::addOrganization();
  7. SchemaGenerator::AddEvent([], $this);
  8. $theme = ThemeSettingsFactory::create();
  1. protected function render(string $template, array $parameters): void
  2. {
  3. Timber::$dirname = ['../../twigs'];
  4. $context = Timber::context($parameters);
  5. $context = array_merge($context, $this->modifyContext());
  6. Timber::render($template, $context);
  7. }
  8. protected function getHeader(): array
  9. {
  1. {
  2. $programsQuery = new ProgramsQuery();
  3. $programsQuery->posts_per_page = 1000;
  4. $data = $this->getMappedData($programsQuery);
  5. $this->render('programPrint.twig', [
  6. 'program_data' => $data,
  7. 'title' => __("Tisk programu", "BRILO_DOMAIN")
  8. ]);
  9. }
  1. return $vars;
  2. });
  3. add_action('template_redirect', function () {
  4. if (get_query_var('print_program')) {
  5. (new PrintProgramController())->indexAction();
  6. exit;
  7. }
  8. });
  1. // Avoid the array_slice() if possible.
  2. if ( 0 === $the_['accepted_args'] ) {
  3. $value = call_user_func( $the_['function'] );
  4. } elseif ( $the_['accepted_args'] >= $num_args ) {
  5. $value = call_user_func_array( $the_['function'], $args );
  6. } else {
  7. $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
  8. }
  9. }
  10. } while ( false !== next( $this->iterations[ $nesting_level ] ) );
  1. *
  2. * @param array $args Parameters to pass to the callback functions.
  3. */
  4. public function do_action( $args ) {
  5. $this->doing_action = true;
  6. $this->apply_filters( '', $args );
  7. // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
  8. if ( ! $this->nesting_level ) {
  9. $this->doing_action = false;
  10. }
  1. } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
  2. // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
  3. $arg[0] = $arg[0][0];
  4. }
  5. $wp_filter[ $hook_name ]->do_action( $arg );
  6. array_pop( $wp_current_filter );
  7. }
  8. /**
  1. * the path to the new template you want to use. This will allow an alternative template to be used
  2. * without interfering with the WordPress loading process.
  3. *
  4. * @since 1.5.0
  5. */
  6. do_action( 'template_redirect' );
  7. }
  8. /**
  9. * Filters whether to allow 'HEAD' requests to generate content.
  10. *
require_once('/data/htdocs/colours-dev/www/wp-includes/template-loader.php') in /data/htdocs/colours-dev/www/wp-blog-header.php (line 19)
  1. // Set up the WordPress query.
  2. wp();
  3. // Load the theme template.
  4. require_once ABSPATH . WPINC . '/template-loader.php';
  5. }
require('/data/htdocs/colours-dev/www/wp-blog-header.php') in /data/htdocs/colours-dev/www/index.php (line 17)
  1. * @var bool
  2. */
  3. define( 'WP_USE_THEMES', true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ . '/wp-blog-header.php';

Stack Trace

ErrorException
ErrorException:
Warning: Attempt to read property "nodeValue" on null

  at /data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Components/SchemaGenerator/SchemaGenerator.php:561
  at Components\SchemaGenerator\SchemaGenerator::get_crumb_array()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Components/SchemaGenerator/SchemaGenerator.php:172)
  at Components\SchemaGenerator\SchemaGenerator::addBreadcrumb()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Components/SchemaGenerator/SchemaGenerator.php:164)
  at Components\SchemaGenerator\SchemaGenerator::addBreadcrumbs()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Controller/ABaseController.php:79)
  at Controller\ABaseController->modifyContext()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Controller/ABaseController.php:109)
  at Controller\ABaseController->render()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Controller/PrintProgramController.php:21)
  at Controller\PrintProgramController->indexAction()
     (/data/htdocs/colours-dev/www/wp-content/themes/coloursofostrava/panda/Requires/Hooks.php:299)
  at Utils\Cache::{closure}()
     (/data/htdocs/colours-dev/www/wp-includes/class-wp-hook.php:341)
  at WP_Hook->apply_filters()
     (/data/htdocs/colours-dev/www/wp-includes/class-wp-hook.php:365)
  at WP_Hook->do_action()
     (/data/htdocs/colours-dev/www/wp-includes/plugin.php:522)
  at do_action()
     (/data/htdocs/colours-dev/www/wp-includes/template-loader.php:23)
  at require_once('/data/htdocs/colours-dev/www/wp-includes/template-loader.php')
     (/data/htdocs/colours-dev/www/wp-blog-header.php:19)
  at require('/data/htdocs/colours-dev/www/wp-blog-header.php')
     (/data/htdocs/colours-dev/www/index.php:17)