Script error - Fix it and you get 10 USD!

Discussion in 'PHP' started by thesurface, Dec 24, 2010.

  1. #1
    Fatal error: Cannot pass parameter 1 by reference in Admin\classes\class.output.php on line 16

    line 16 is $this->loadTemplate('global',$this->words);

    for more info PM me :)

    class output {
      var $config = array();
      var $html = null;
      var $action = '';
      var $words = array();
      var $templates = array();
      function __construct($config,$action) {
        $this->config = &$config;
        $this->action = $action;
        $this->words = stringClass::loadwords('global');
        $this->loadTemplate('global',$this->words);
      }
    PHP:

     
    thesurface, Dec 24, 2010 IP
  2. lucianmija

    lucianmija Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,
    One thing I notice in here is : why do you pass an internal member of the class as a parameter to a method? you don't have access to "$words" in loadTemplate(...) ?
     
    lucianmija, Dec 25, 2010 IP
  3. thesurface

    thesurface Active Member

    Messages:
    260
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #3
    so how should i fix it ? :(
     
    thesurface, Dec 25, 2010 IP
  4. awesomenyn

    awesomenyn Peon

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    can i see your full site script?
     
    awesomenyn, Dec 25, 2010 IP
  5. thesurface

    thesurface Active Member

    Messages:
    260
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #5
    currently i am sended it to mastermunj and waiting if he can fix it. :)
     
    thesurface, Dec 25, 2010 IP
  6. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Fixed and replied your PM long back, let me know if it resolved your problem.
     
    mastermunj, Dec 28, 2010 IP