Skip Navigation

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 ) ) {

2 Responses to “Fatal Error: Trying to get property of non-object in class-wpml-ls-templates.php”

  1. Salve, ho acquistato ieri la versione inlimitata del vostro plugin, dopo averlo installato ed attivato mi ha dato un problema con i permalink delle categorie prodotti, quando cerco di entrare sulla pagina della categoria questa mi si visualizza completamente bianca, mentre le altre si vedono.
    Come posso risolvere il problema.
    In attesa di risposta porgo cordiali saluti