Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page properties must have correct type (e.g. string)
#1
Some important global variables like $url are not strings, but XML node objects.

Thus e.g. the following does not work, because the node is not converted to a string (automatically):
Code:
<?php get_component(return_page_slug()); ?>
(display the component with the same name as the page)

The convertion has to be done explicitly:
Code:
<?php get_component((string) return_page_slug()); ?>

Preferably the global variables should already have the correct type, but at least the access functions like return_page_slug must return the correct type.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 1 Guest(s)