3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CakePHP1.2.5をPHP5.4環境でのStrict Standards対応

Last updated at Posted at 2015-10-19

##概要
CakePHP1.2.5をPHP5.4環境で実行すると、
Strict Standardsなるエラーがガンガン出てくるので、
エラーを非表示にして通過しちゃおうと言うやつ。

##注意点
※バージョン変更出来るならこれはオススメしません。

##作業手順
CakePHPではフレームワーク中でerror_reportingを定義している為、
php.iniの設定が反映されないので、記述部分を直接書き換えてしまいます。
4つ目のファイルは書き換えなくて良いが、個人的に気持ちが悪いので…

##変更ファイル

cake/bootstrap.php(33行目)
- E_ALL & ~E_DEPRECATED
+ E_ALL & ~E_STRICT & ~E_DEPRECATED
cake/console/cake.php(144行目)
- E_ALL & ~E_DEPRECATED
+ E_ALL & ~E_STRICT & ~E_DEPRECATED
cake/libs/configure.php(295行目)
- E_ALL & ~E_DEPRECATED
+ E_ALL & ~E_STRICT & ~E_DEPRECATED
cake/tests/cases/libs/configure.test.php(165行目)
- E_ALL & ~E_DEPRECATED
+ E_ALL & ~E_STRICT & ~E_DEPRECATED
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?