Running Zend Framework on PHP 5.1.6 - patch or fix for ksort()? -
I using 1.10 for deployment Araciel server in a corporate client made a ZF app with PHP 5.1. 6 is It will not work.
I went to Gogal and now it is a realization that this is the version of PHP. I did not realize that was the minimum requirement for PHP 5.2.4 of Jepif, and serious error "Call Aprfeild method to call Hedlank seems due Zend_View_Helper_Placeholder_Container :: ksort ()":
< code> PHP fatal error: Call line at 321 / library / Zend / View / Helper / mandatory method Zend_View_Helper_Placeholder_Container :: ksort (in Hedlink.afpeepi) to
client upgrade your PHP Will; I do not want to re-write the app without the ZF, and I did not want to downgrade the ZF to the first version.
Is there some patch that I can use JSF 1.10 to add KSORT around this? There can be other problems, but this is where I got stuck. In
Any advice welcome
Thank you
Ian
Edit: As I said in the went comments below , I hope many people will be affected before and continue to do this, because the RHEL 5 will be a standard in the corporate environment for the coming time. I was expecting a link for an existing solution, but rather to prepare someone from scratch.
Update: I accepted
The Zend / View / Helper / Placeholder / Container / Abstract.php
< Adding the following public method to pre> / ** * key * * @ Returns array * / public function ksort () {$ items = $ this- & gt; GetArrayCopy (); Return kSert ($ item); }
There was one remaining issue; Because of a string conversion in Zend_View_Helper_Doctype, a PHP notice compares this function to people who are above and below, this is an error in the library.
public function html5 () {return (stristr ($ this- & gt; doctype (), & lt ;; DOCTYPE html & gt; ')? True: false); } Changed in
:
is a public function html5 () {return (stristr ($ this-> getDoctype (), '& lt ;! DOCTYPE Html & gt;; ')? Right wrong); }
Patching library I usually used to do the last thing, but in this case I was fired from an opportunity. We will ensure that the patch has been prepared in the repo and has been clearly documented for future developers.
I got the same issue today that I found a solution in this.
Add the following snippet to /Zend/View/Helper/Placeholder/Container/Abstract.php:
/ ** * array sort by * key * * Returns array * / Public function ksort () {$ items = $ this- & gt; GetArrayCopy (); Return kSert ($ item); }
Comments
Post a Comment