Menu

Declaration of MySmarty::display errors

Duncan
2013-08-31
2013-08-31
  • Duncan

    Duncan - 2013-08-31

    Just been starting to try and get PHP Gift Registry running on a free web host.

    I was getting errors along the lines of:

    Declaration of MySmarty::display() should be compatible with Smarty_Internal_TemplateBase::display(....
    

    The solution is to edit includes\MySmarty.class.php and change the definition of display() to:

    public function display($template = null, $cache_id = null, $compile_id = null, $parent = null) {
        parent::assign('isadmin', $_SESSION['admin']);
        parent::assign('opt', $this->opt());
        parent::display($template);
    }
    
     
    • Ryan Walberg

      Ryan Walberg - 2013-08-31

      Thanks. What version of Smarty and PHP are on the host?

       
  • Duncan

    Duncan - 2013-08-31

    Just noticed that this should really be in the Help section - sorry.

    Anyway; PHP Version 5.4.12
    Smarty I don't know and can't see how to find out (I'm mainly muddling through...)

     

    Last edit: Duncan 2013-08-31
  • Duncan

    Duncan - 2013-08-31

    I tried hacking it into index.php (as "print $smarty->version;") but it gives

    Notice: Undefined property: MySmarty::$version in /srv/disk6/1497319/www/presents.dx.am/phpgiftreg/includes/Smarty-3.1.12/libs/Smarty.class.php on line 671
    

    Isn't Smarty the version installed with PHP Gift Registry (i.e. Smarty-3.1.12); it's not a system componenent is it?

     
    • Ryan Walberg

      Ryan Walberg - 2013-08-31

      Oh yeah, you're right, phpgiftreg comes with a fixed version of Smarty.

      That syntax of ${smarty.version} is meant for the template file, not the
      PHP file. I don't think it works both ways.

      On Sat, Aug 31, 2013 at 1:33 PM, Duncan Lilly duncan_lilly@users.sf.netwrote:

      I tried hacking it into index.php (as "print $smarty->version;") but it
      gives

      Notice: Undefined property: MySmarty::$version in /srv/disk6/1497319/www/presents.dx.am/phpgiftreg/includes/Smarty-3.1.12/libs/Smarty.class.php on line 671

      Isn't Smarty the version installed with PHP Gift Registry (i.e.
      Smarty-3.1.12); it's not a system componenent is it?


      Declaration of MySmarty::display errorshttps://sourceforge.net/p/phpgiftreg/discussion/379974/thread/77c942ca/?limit=25#5db0

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/phpgiftreg/discussion/379974/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.