mihdan / cyr2lat

Converts Cyrillic characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
https://wordpress.org/plugins/cyr2lat/
GNU General Public License v2.0
36 stars 10 forks source link

Call to a member function get_attributes() on string #149

Closed QartHadasht closed 9 months ago

QartHadasht commented 9 months ago

Добрый день. Используется плагин woocommerce. При добавлении товара в корзину получаем ошибку:

"POST /product/rubashka/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "wps", referrer: "https://wps/product/rubashka/"
2024/02/13 21:01:47 [error] 3298152#3298152: *37 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get_attributes() on string in /home/hs/apps/wps/wp-content/plugins/cyr2lat/src/php/Main.php:413

Fatal error: Uncaught Error: Call to a member function get_attributes() on string in /home/hs/apps/wps/wp-content/plugins/cyr2lat/src/php/Main.php:413 
Stack trace: 
#0 /home/hs/apps/wps/wp-content/plugins/cyr2lat/src/php/Main.php(435): CyrToLat\Main->is_wc_product_attribute() 
#1 /home/hs/apps/wps/wp-content/plugins/cyr2lat/src/php/Main.php(355): CyrToLat\Main->is_wc_attribute() 
#2 /home/hs/apps/wps/wp-includes/class-wp-hook.php(324): CyrToLat\Main->sanitize_title() 
#3 /home/hs/apps/wps/wp-includes/plugin.php(205): WP_Hook->apply_filters() 
#4 /home/hs/apps/wps/wp-includes/formatting.php(2235): apply_filters() 
#5 /home/hs/apps/wps/wp-content/plugins/jetpack-boost/app/lib/class-storage-post-type.php(30): sanitize_title() 
#6 /home/hs/apps/wps/wp-content/plugins/jetpack-boost/app/lib/critical-css/Critical_CSS_Storage.php(30): Automattic\Jetpack_Boost\Lib\Storage_Post_Type->__construct() 
#7 /home/hs/apps/wps/wp-content/plugins/jetpack-boost/app/lib/critical-css/source-providers/Source_Providers.php(99): Automattic\Jetpack_Boost\ in /home/hs/apps/wps/wp-content/plugins/cyr2lat/src/php/Main.php on line 413

Версии: wordpress: 6.4.3 woocommerce: 8.5.2 cyr2lat: 6.0.7

kagg-design commented 9 months ago

Спасибо за репорт. Исправлено в 6.0.8.