- סטטוס
- נפתר
- דווח עבור
- WPML Multilingual CMS 3.1.9.3
- נפתר בגרסה
- 3.1.9.4
סקירה כללית של התקלה
Catchable fatal error: Object of class stdClass could not be converted to string in /home/lahjatup/public_html/markkinointiopisto.fi/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php on line 252
או
Warning: dirname() expects parameter 1 to be string, object given in /home1/treasure/public_html/dev/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-config/wpml-config.class.php on line 252
שגיאות ה־PHP שלעיל יופיעו בעמודי אזור הניהול שלך, כגון עמודי התוספים, ערכת העיצוב או ניהול תרגום > הגדרת תוכן רב-לשוני.
פתרון עוקף
- התחבר באמצעות FTP
- אתר את הקובץ sitepress-multilingual-cms/
inc/wpml-config/wpml-config. class.php - אתר את השורה המוזכרת בשגיאת ה־PHP שאתה רואה (252). לדוגמה:
$type = ( dirname( $file ) == get_template_directory() || dirname( $file ) == get_stylesheet_directory() ) ? 'theme' : 'plugin'; $admin_text_context = basename( dirname( $file ) );
- מחק את שתי שורות הקוד
- באותו קובץ, אתר את הקוד הבא (בסביבות שורה 210):
}else{ $config = icl_xml2array( file_get_contents( $file ) ); } - שנה את בלוק הקוד הזה כך שיהיה:
}else{ $config = icl_xml2array( file_get_contents( $file ) ); $type = ( dirname( $file ) == get_template_directory() || dirname( $file ) == get_stylesheet_directory() ) ? 'theme' : 'plugin'; $admin_text_context = basename( dirname( $file ) ); } - שמור את הקובץ והעלה אותו לשרת שלך