Background of the issue:
I am trying to fix a fatal error in the WPML plugin. The error occurs in the file D:wamp64wwwpracticebuzzmtcthemewp-contentpluginssitepress-multilingual-cmsclassescore-abstract-classesclass-wpml-element-translation.php on line 286. I expected to see a fix by adding this code in your next release: private function maybe_populate_cache( in sitepress-multilingual-cmsclassescore-abstract-classesclass-wpml-element-translation.php to handle the error gracefully if ( ! $element_id || ! is_scalar( $element_id ) ) { return false; } The bug was there because element_id is an array. Invalid $element_id: Array ( [0] => 60715 [1] => 60720 [2] => 60804 [3] => 60811 [4] => 60828 [5] => 60834 [6] => 60850 [7] => 60855 [8] => 60862 [9] => 60866 ). Link to a page where the issue can be seen: hidden link
Symptoms:
PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in D:wamp64wwwpracticebuzzmtcthemewp-contentpluginssitepress-multilingual-cmsclassescore-abstract-classesclass-wpml-element-translation.php:282
Questions:
How can I fix the fatal error in the WPML plugin?
Is there a workaround for the issue with element_id being an array?
The topic ‘[Closed] fatal error in the plugin’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.