简体   繁体   中英

`CakeResponse` referencing undefined variables in `compact()` call triggers errors/notices

I'm updating my first CakePHP application on a web server, but pages show errors which are at the end of this post. I can't find the file(s) which have not uploded correctly. Thanks for help.

CakePHP version: 2.9

Error messages:

Notice (8): compact(): Undefined variable: etagMatches [CORE/Cake/Network/CakeResponse.php, line 1171]*

Notice (8): compact() [function.compact]: Undefined variable: timeMatches [CORE/Cake/Network/CakeResponse.php, line 1171]*

Notice (8): compact() [function.compact]: Undefined variable: subject [CORE/Cake/Utility/ObjectCollection.php, line 128]*

As of PHP 7.3 compact() will trigger an error when referencing undefined variables.

This has been fixed in CakePHP 2.10.13, either upgrade your application (preferred), or downgrade your PHP version.

https://github.com/cakephp/cakephp/pull/12487

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM