Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Results 1 to 6 of 6

Thread: PHP Strict Standards: Only variables should be passed by reference

  1. #1
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default PHP Strict Standards: Only variables should be passed by reference

    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

  2. #2
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default

    Any thoughts on this error, its re -appearing but not often?

  3. #3
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    We will investigate it and send you reply soon.
    Last edited by vBET; 04-06-18 at 12:25.

  4. #4
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Quick fix for your issue:
    1. Open file includes/vbenterprisetranslator_class_translator.php
    2. Find
    Code:
    public function translateTextToDivide(&$toTranslate, $serie) {
    3. Remove from the line sign '&'
    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.

  5. #5
    Senior Member
    Join Date
    Jun 2010
    Posts
    276

    Default

    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.

  6. #6
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    Solution without performance punishment will be included in new release. For quick fix, please:
    1. Open file includes/vbenterprisetranslator_class_translator.php
    2. Find:
    Code:
    return vbet_translateEncodedText(substr($toTranslate, 0, $point), $this->from, $this->to, $serie, $this)
    .$this->translateTextToDivide(substr($toTranslate, $point), $serie);
    3. Replace by:
    Code:
    $rest = substr($toTranslate, $point);
    return vbet_translateEncodedText(substr($toTranslate, 0, $point), $this->from, $this->to, $serie, $this)
    .$this->translateTextToDivide($rest, $serie);
    4. Go to 2 (several translators have this code)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •