1

CakePHP2.xとPHP5.4を使用していますが、次のエラーが発生します。

Strict (2048): Only variables should be passed by reference [APP/Controller/Component/AttachmentComponent.php, line 106]
Strict (2048): Only variables should be passed by reference [APP/Controller/Component/AttachmentComponent.php, line 169]
Strict (2048): Only variables should be passed by reference [APP/Controller/Component/AttachmentComponent.php, line 169]

https://github.com/tute/Thumbnail-component-for-CakePHP/tree/cake2

php 5.3では、すべてが正常に機能します。どうすればこれを修正できますか?

4

1 に答える 1

3
$file_name = end(split($ds, $tmpfile));

する必要があります

$parts = split($ds, $tmpfile);
$file_name = end($parts);

コンポーネントでそれを修正し、元の作成者に PR を送信できます

于 2012-09-25T14:39:32.263 に答える