douhunkuang8955 2017-03-22 14:54
浏览 66
已采纳

CakePHP 3 transliterator_transliterate PHP关于全新安装的警告

I have installed CakePHP 3.4.3 using Composer (their recommended way) and my system meets all of the requirements. Upon installation and basic configuration everything is ticked green.

I've used bin/bake to bake the files for 1 very simple table which only has 5 columns: id, name, url, created, modified

When I go to insert a new record it's giving the following error message:

Warning (2): transliterator_transliterate(): Could not create transliterator with ID "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove" (transliterator_create: unable to open ICU transliterator with id "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove": U_INVALID_ID) [CORE/src/Utility/Text.php, line 1070]

I've Googled this but can't find any information I can understand about transliterator_transliterate() (never heard of this either).

As the file this is originating from src/Utility/Text.php is part of the Cake core I feel it's unwise to delve into this or modify it.

Why is this error being shown, what does it mean, and how can I fix it?

If I switch the debug setting to false in config/app.php this hides the message, but I don't feel that's a valid solution as it's complaining about something.

As I say, my system meets all their requirements: PHP 7, centOS, Apache and hasn't had any other errors during installation.

  • 写回答

1条回答 默认 最新

  • douxian3828 2017-03-23 14:09
    关注

    The solution is to install/update the ICU library, which seems to be either missing or too old.

    The requirement for the library was removed from the composer definition lately, and turned into a suggestion, as it caused a lot of trouble for many people with outdated setups. While removing requirements isn't ideal, the fact that only two methods in the core require it seems to have been the justification for it being moved to a suggestion.

    The suggest description makes it rather clear when this library is needed:

    The intl PHP library, to use Text::transliterate() or Text::slug()

    However it doesn't make any statements regarding the required version, which is something that surely could be improved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失