Revert "No truncate when drop table."
Not truncating tables when they are created causes a number of
issues in ControllerTestCases as indicated by the comments in #3646 post merge.
While filter_var() allows a number of email addresses that
Validation::email() does not, it misses out of email address that
contain IDN host names, and unicode mailboxes. Both of these are
generally deliverable, and should be permitted. filter_var() also fails
on local mailboxes like `root@localhost` which is useful in the context
of cron jobs.
Fixes#3742
Modify data originally from `php://input`. Useful for altering json/xml
data in middleware or DispatcherFilters before it gets to
RequestHandlerComponent or other controllers.
Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter for
`View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected
Changed Event names back, added view type getter
Changed `Element.beforeRender` and `Element.afterRender` back to
`View.beforeRender` and `View.afterRender` Also added a getter and
setter for `View::_currentType`.
Added more tests to make sure that things were getting reset right
And also that View::render and View::element events were working
As expected
From php.net/exception.getcode
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
And also made it so when the event fires the subjects type is
`View::TYPE_ELEMENT`. Wrote some tests which I hope are done right I
don't really know the bes way to write a test for a event listener
I'm not sure on whether this is a problem with my local app but I have
seen it a couple of times in a couple of projects: Warning (2): Invalid
argument supplied for foreach() [CORE/Cake/Utility/Hash.php, line 52]
I think Hash::get should be able to handle this better rather than
throwing an error in a core Util file.
Refs #3754
This has the benefit that the realpath() method is not applied to a
registered stream wrapper in the constructor of the Folder class.
Using the realpath() method will break the stream.
Thank "davalb" for the original patch.