Add CKEditor to CakePHP with model validation

Yesterday I had a very frustrating issue implementing CKEditor (an awesome open-source WYSIWYG editor) in a CakePHP 2.3.2 installation. I thought the issue had something to do with CakePHP … ow boy, was I wrong 🙂

Continue reading Add CKEditor to CakePHP with model validation

Declaration of beforeSave() should be compatible with Model::beforeSave( $options = array() )

I’ve just upgraded my servers to PHP 5.4 and got this error when loading a project.

Declaration of MyModelName::beforeSave() should be compatible with Model::beforeSave( $options = array() )

There seems to be a problem when using PHP 5.4 and CakePHP 2.1 which results in this error.  Since PHP 5.4 E_ALL and E_STRICT are now combined and with a default CakePHP installation error reporting is set to E_ALL & ~E_DEPRECATED!

Luckily it is really easy to fix!

Continue reading Declaration of beforeSave() should be compatible with Model::beforeSave( $options = array() )