- Status
- Resolved
- Reported for
- WPML Multilingual CMS 3.6.1
- Resolved in
- 3.6.2
Overview of the issue
In some cases, the following fatal error happens and breaks the rendering of a page:
Trying to get property of non-object in …/classes/language-switcher/class-wpml-ls-templates.php on line 223
This issue occurs on some systems where the glob() function returns false instead of 0.
Workaround
As a temporary patch, please edit the file wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 222.
Replace:
if ( count( glob( $search_path ) ) > 0 ) {
With
if ( glob( $search_path ) ) {