Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Caching attributes
Hi,

I have some problems with caching attributes. I've registered a function
like this:

$GLOBALS['smarty']->register_function('recent_articles',
'do_recent_articles', false, array('article_id','category_id'));

When using the cache version of the script i get the following errors:

Warning: current() [function.current]: Passed variable is not an array or
object in smarty263\Smarty.class.php on line 1899

Warning: next() [function.next]: Passed variable is not an array or object
in smarty263\Smarty.class.php on line 1900

The error is easily fixed with a is_array() check before lines 1899-1900,
but that maybe break other stuff.

Another thing is that the cached version doesn't work because the function
doesn't get the required parameters ('article_id','category_id'). But if I
use the following instead

$GLOBALS['smarty']->register_function('recent_articles',
'do_recent_articles', false, array('article_id' => 1,'category_id' => 1));

The functions receives the correct values (not 1 and 1), but the PHP error
is still there.

Any ideas? Is this a bug?

Cheers

Martin

Report this thread to moderator Post Follow-up to this message
Old Post
Martin Kjeldsen
08-21-04 09:03 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:41 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.