Caution: The documentation you are viewing is
for an older version of Zend Framework.
You can find the documentation of the current version at:
Zend Framework 1.9 - Zend Framework Migration Notes
When upgrading from a release of Zend Framework earlier than 1.9.0 to any 1.9 release, you should note the following migration notes.
For security reasons we had to turn off the default fallback mechanism of the MimeType, ExcludeMimeType, IsCompressed and IsImage validators. This means, that if the fileInfo or magicMime extensions can not be found, the validation will always fail.
If you are in need of validation by using the HTTP fields which are provided by the user then you can turn on this feature by using the enableHeaderCheck() method.
Note: Security hint
You should note that relying on the HTTP fields, which are provided by your user, is a security risk. They can easily be changed and could allow your user to provide a malcious file.
Example #1 Allow the usage of the HTTP fields
Prior to the 1.9 release, Zend_Filter allowed the usage of the static get() method. As with release 1.9 this method has been renamed to filterStatic() to be more descriptive. The old get() method is marked as deprecated.
In version 1.9 of Zend Framework, there has been a change in the way Zend_Http_Client internally stores information about files to be uploaded, set using the Zend_Http_Client::setFileUpload() method.
This change was introduced in order to allow multiple files to be uploaded with the same form name, as an array of files. More information about this issue can be found in » this bug report.
Example #2 Internal storage of uploaded file information
As you can see, this change permits the usage of the same form element name with more than one file - however, it introduces a subtle backwards-compatibility change and as such should be noted.
Starting from version 1.9, the protected method _getParametersRecursive() is no longer used by Zend_Http_Client and is deprecated. Using it will cause an E_NOTICE message to be emitted by PHP.
If you subclass Zend_Http_Client and call this method, you should look into using the Zend_Http_Client::_flattenParametersArray() static method instead.
Again, since this _getParametersRecursive() is a protected method, this change will only affect users who subclass Zend_Http_Client.
Some specialized translation methods have been deprecated because they duplicate existing behaviour. Note that the old methods will still work, but a user notice is triggered which describes the new call. The methods will be erased with 2.0. See the following list for old and new method call.
|Old call||New call|
|getCountryTranslationList($locale)||getTranslationList('territory', $locale, 2)|
|getTerritoryTranslationList($locale)||getTranslationList('territory', $locale, 1)|
|getLanguageTranslation($value, $locale)||getTranslation($value, 'language', $locale)|
|getScriptTranslation($value, $locale)||getTranslation($value, 'script', $locale)|
|getCountryTranslation($value, $locale)||getTranslation($value, 'country', $locale)|
|getTerritoryTranslation($value, $locale)||getTranslation($value, 'territory', $locale)|
Additionally, users of the 1.9 series may be affected by other changes starting in version 1.9.7. These are all security fixes that also have potential backwards compatibility implications.
A slight change was made in the 1.9 series to modify the default usage of the Editor dijit to use div tags instead of a textarea tag; the latter usage has » security implications, and usage of div tags is recommended by the Dojo project.
In order to still allow graceful degradation, a new degrade option was added to the view helper; this would allow developers to optionally use a textarea instead. However, this opens applications developed with that usage to XSS vectors. In 1.9.7, we have removed this option. Graceful degradation is still supported, however, via a noscript tag that embeds a textarea. This solution addressess all security concerns.
The takeaway is that if you were using the degrade flag, it will simply be ignored at this time.
In order to default to a more secure character encoding, Zend_Filter_HtmlEntities now defaults to UTF-8 instead of ISO-8859-1.
Additionally, because the actual mechanism is dealing with character encodings and not character sets, two new methods have been added, setEncoding() and getEncoding(). The previous methods setCharSet() and setCharSet() are now deprecated and proxy to the new methods. Finally, instead of using the protected members directly within the filter() method, these members are retrieved by their explicit accessors. If you were extending the filter in the past, please check your code and unit tests to ensure everything still continues to work.