Error after upgrading VB to 4.2.5 then latest release of VBET..
PHP Strict Standards: Only variables should be passed by reference in /xxxx/includes/vbenterprisetranslator_class_translator.php on line 410
Error after upgrading VB to 4.2.5 then latest release of VBET..
PHP Strict Standards: Only variables should be passed by reference in /xxxx/includes/vbenterprisetranslator_class_translator.php on line 410
Any thoughts on this error, its re -appearing but not often?
We will investigate it and send you reply soon.
Last edited by vBET; 04-06-18 at 12:25.
Quick fix for your issue:
1. Open file includes/vbenterprisetranslator_class_translator.php
2. Find
3. Remove from the line sign '&'Code:public function translateTextToDivide(&$toTranslate, $serie) {
4. Go to 2 (every translator has its own version of this function so you need to remove the sign in several places)
Some explanation - the sign '&' allows to pass value without copying it so it was added for performance reasons.
Since some version of PHP the language forces to pass there only variables (not values count ad hoc when function is called). This is very inconvenient, because we need to change code in many places and create temporary variables only for calling function, but that is how it works now, so we will have to update our code.
We gave you quick fix. We will check how the function is used and decide, is it better to remove '&' or create temporary variables in some places.
Thank you, but if performance is an issue, I will allow the error as its a very small occurrence but Thank you for the explanation.
Solution without performance punishment will be included in new release. For quick fix, please:
1. Open file includes/vbenterprisetranslator_class_translator.php
2. Find:
3. Replace by:Code:return vbet_translateEncodedText(substr($toTranslate, 0, $point), $this->from, $this->to, $serie, $this) .$this->translateTextToDivide(substr($toTranslate, $point), $serie);
4. Go to 2 (several translators have this code)Code:$rest = substr($toTranslate, $point); return vbet_translateEncodedText(substr($toTranslate, 0, $point), $this->from, $this->to, $serie, $this) .$this->translateTextToDivide($rest, $serie);