SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: strange error

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    strange error

    Ok i'm trying to make very basic zend framework + smarty applications, and get this error:

    Strict Standards: Creating default object from empty value in E:\wamp\www\uf1r\library\Zend\View\Smarty.php on line 58

    and this is the code that should have this error:
    PHP Code:
        public function setScriptPath($path)
        {
            
            if (
    is_readable($path)) 
            {
                
    //Sets all smarty directories
                //$this->_smarty->template_dir = $path;
                
    $this->_smarty->template_dir $path '/templates'//<--line 58
                
    $this->_smarty->compile_dir $path '/templates_c';
                
    $this->_smarty->cache_dir $path '/cache';
                
    $this->_smarty->config_dir $path '/config';

                return;
         
            }

            throw new 
    Exception('Invalid path provided');
        } 
    Does anyone know what is this error about?

  2. #2
    SitePoint Zealot iScrawl's Avatar
    Join Date
    Mar 2009
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Classes are types, that is, they are blueprints for actual variables.
    You have to create a variable of the desired type with the new operator.
    Hanan Moiseyev
    Online games and Videos - http://www.playwithroger.com
    Share your art - http://www.iscrawl.com


Bookmarks

Posting Permissions

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