1

I randomly see errors from Debug Kit in CakePHP relating to a template filename string, when it is passed to MessageFormatter. Sometimes the view loads fine, other times it fails with the following:

Fatal error: [Aura\Intl\Exception\CannotFormat] Invalid UTF-8 data in string argument: '/Users/daniel/cakebox/Apps/mycake3/src/Template/Error/error500.ctp': U_ILLEGAL_ARGUMENT_ERROR

#0 /Users/daniel/cakebox/Apps/mycake3/vendor/cakephp/cakephp/src/I18n/Formatter/IcuFormatter.php(51): Cake\I18n\Formatter\IcuFormatter->_formatMessage('en_US', 'Render {0}', Array)

#1 /Users/daniel/cakebox/Apps/mycake3/vendor/aura/intl/src/Aura/Intl/Translator.php(142): Cake\I18n\Formatter\IcuFormatter->format('en_US', 'Render {0}', Array)

#2 /Users/daniel/cakebox/Apps/mycake3/vendor/cakephp/cakephp/src/I18n/functions.php(81): Aura\Intl\Translator->translate('Render {0}', Array)

#3 /Users/daniel/cakebox/Apps/mycake3/vendor/cakephp/debug_kit/src/Panel/TimerPanel.php(85): __d('debug_kit', 'Render {0}', '/Users/daniel/c...')

#4 /Users/daniel/cakebox/Apps/mycake3/vendor/cakephp/cakephp/src/Event/EventManager.php(409): DebugKit\Panel\TimerPanel->DebugKit\Panel{closure}(Object(Cake\Event\Event), '/Users/daniel/c...')

#5 /Users/daniel/cakebox/Apps/m in /Users/daniel/cakebox/Apps/mycake3/vendor/cakephp/cakephp/src/Error/ErrorHandler.php on line 156

I've tried a number of debugging options, but I can't work out what the issue is? The string looks fine to me, and is confirmed as UTF-8 by mb_check_encoding($string, 'UTF-8');

Niklesh Raut
  • 34,013
  • 16
  • 75
  • 109
Daniel
  • 61
  • 4

0 Answers0