Typo3升级后,无法将空字符串分配给Fluidpages \ Classes \ Provider \ PageProvider.php第193行中的字符串偏移量

时间:2018-11-22 10:47:06

标签: php content-management-system typo3 typo3-8.x typo3-extensions

我最近将typo3项目从7.6.24升级到8.7.20。 当我单击后端中的任何页面尝试查看或编辑任何内容元素时,都会引发此错误:

PHP Warning: Cannot assign an empty string to a string offset in typo3conf\ext\fluidpages\Classes\Provider\PageProvider.php line 193

该函数getControllerActionFromRecord()中的调试代码和字符串偏移量似乎不是这种情况。

任何有用的线索都会受到赞赏

我的系统信息:

Typo3:8.7.20,

Php:7.2,

流体页面:4.3.0

通量:9.1.0

1 个答案:

答案 0 :(得分:1)

只需尝试从该函数getControllerActionFromRecord()中的controlerActionName变量中删除{0} ...

说明:

执行此操作

$parts = explode('->', $action);
$controllerActionName = end($parts);

您很有可能会从end($ parts)取回字符串。 请参阅此处有关“ end()”的文档:https://secure.php.net/manual/en/function.end.php

根据我的经验,php 7.2中的大多数“偏移”错误都是C ++中的“非法类型转换”错误,例如...有时我也会被他们弄糊涂...