mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding deprecation warning for $beforeFilter property usage
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5548 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
268838eafa
commit
b7d7e70d46
1 changed files with 2 additions and 1 deletions
|
@ -313,8 +313,9 @@ class Dispatcher extends Object {
|
||||||
*/
|
*/
|
||||||
function start(&$controller) {
|
function start(&$controller) {
|
||||||
if (!empty($controller->beforeFilter)) {
|
if (!empty($controller->beforeFilter)) {
|
||||||
if (is_array($controller->beforeFilter)) {
|
trigger_error(sprintf(__('Dispatcher::start - Controller::$beforeFilter property usage is deprecated and will no longer be supported. Use Controller::beforeFilter().', true)), E_USER_WARNING);
|
||||||
|
|
||||||
|
if (is_array($controller->beforeFilter)) {
|
||||||
foreach ($controller->beforeFilter as $filter) {
|
foreach ($controller->beforeFilter as $filter) {
|
||||||
if (is_callable(array($controller,$filter)) && $filter != 'beforeFilter') {
|
if (is_callable(array($controller,$filter)) && $filter != 'beforeFilter') {
|
||||||
$controller->$filter();
|
$controller->$filter();
|
||||||
|
|
Loading…
Add table
Reference in a new issue