Re: Can't find my error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 May 2010 18:55, David McGlone <david@xxxxxxxxxxxxx> wrote:
> I've checked and checked and re-checked and I can't figure out what I've done
> wrong. I'm getting a parse error:
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /home/david/www/Joe/current/presentation/smarty_plugins/function.load_products_list.php
> on line 27.
>
> Can anyone spot my error? I'd appreciate the help.
>
> Here is the function.load_products_list.php file:
>
> 1. <?php
> 2. function smarty_function_load_products_list($params, $smarty)
> 3. {
> 4.      $products_list = new $ProductsList();
> 5.      $products_list->init();
> 6.
> 7.      //assign the template variable
> 8.      $smarty->assign($params['assign'], $products_list);
> 9. }
> 10.
> 11. //Manage the products list
> 12. class ProductsList
> 13. {
> 14.     public $mProducts;
> 15.     public $mSelectedProduct;
> 16.
> 17.     private $mBoCatalog;
> 18.
> 19.     //constructor initializes business tier object
> 20.     //and reads query string parameter
> 21.     function __construct()
> 22.     {
> 23.             //creating the middle tier object
> 24.             $this->mBoCatalog = new BoCatalog();
> 25.             //if ProductID exists in the query string, we're viewing a product.
> 26.             if(isset($_GET['ProductID']))
> 27.             $this->mSelectedProduct = (init)$_GET['ProductID'];

pretty sure (init) is not a valid cast ...

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux