Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

PHP Deprecated: Non-static method SmartyPaginate::connect

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
jmd8045
Smarty Rookie


Joined: 12 Sep 2005
Posts: 7
Location: Georgetown,TX

PostPosted: Thu Nov 03, 2016 8:54 pm    Post subject: PHP Deprecated: Non-static method SmartyPaginate::connect Reply with quote

Is this going to be fixed ?

BTW: I am running (Smarty-3.1.7)

Or is there a prescribed way to handle this ?

Jim

PHP Deprecated: Non-static method SmartyPaginate::getTotal() should not be called statically, assuming $this from incompatible context in /var/www/CCBP/htdocs/smarty/libs/SmartyPaginate.class.php on line 51
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Nov 03, 2016 9:42 pm    Post subject: Reply with quote

You're running an extremely outdated version of Smarty.
Back to top
View user's profile Send private message
jmd8045
Smarty Rookie


Joined: 12 Sep 2005
Posts: 7
Location: Georgetown,TX

PostPosted: Thu Nov 03, 2016 9:48 pm    Post subject: Reply with quote

AnrDaemon wrote:
You're running an extremely outdated version of Smarty.


So are you saying that it is fixed in a newer version ?

or just making an observation.

When I run it under 3.1.30
I get:

new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");" missing or illegal $smarty.section property attribute <--
thrown in /var/www/CCBP/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 16
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Nov 03, 2016 10:19 pm    Post subject: Reply with quote

I'm pointing your apparent mistake. You're reporting an issue for a version several years old.
If you can reproduce it with recent release(at least) - someone might take the time to investigate.
Back to top
View user's profile Send private message
jmd8045
Smarty Rookie


Joined: 12 Sep 2005
Posts: 7
Location: Georgetown,TX

PostPosted: Thu Nov 03, 2016 10:21 pm    Post subject: Reply with quote

AnrDaemon wrote:
I'm pointing your apparent mistake. You're reporting an issue for a version several years old.
If you can reproduce it with recent release(at least) - someone might take the time to investigate.


If there a newer version than 3.1.30 ?

SMARTY VERSION [3.1.30]

Non-static method SmartyPaginate::connect() should not be called statically, assuming $this from incompatible context in /var/www/CCBP/htdocs/libs/class.event_handler.php on line 492

Non-static method SmartyPaginate::reset() should not be called statically, assuming $this from incompatible context in /var/www/CCBP/htdocs/smarty/libs/SmartyPaginate.class.php on line 44
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Nov 03, 2016 10:23 pm    Post subject: Reply with quote

jmd8045 wrote:
When I run it under 3.1.30
I get:

new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");" missing or illegal $smarty.section property attribute <--
thrown in /var/www/CCBP/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 16

In Smarty 3.1.30 line 16 in this file is a comment line. Can't possible be throwing any exceptions.
Try updating it again, after you're cleared any of existing files.
Back to top
View user's profile Send private message
jmd8045
Smarty Rookie


Joined: 12 Sep 2005
Posts: 7
Location: Georgetown,TX

PostPosted: Thu Nov 03, 2016 10:40 pm    Post subject: Reply with quote

AnrDaemon wrote:
jmd8045 wrote:
When I run it under 3.1.30
I get:

new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");" missing or illegal $smarty.section property attribute <--
thrown in /var/www/CCBP/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 16

In Smarty 3.1.30 line 16 in this file is a comment line. Can't possible be throwing any exceptions.
Try updating it again, after you're cleared any of existing files.



TEMPLATE:
<script type="text/javascript">
{section name="y" loop=$menu}
var menuitem{$smarty.section.y.iteration} = new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");
{/section}
</script>

I will also try the update again.

Jim

After update

PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/CCBP/htdocs/smarty/templates/menu_nav.tpl" on line 16 "var menuitem{$smarty.section.y.iteration} = new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");" missing or illegal $smarty.section property attribute <--
thrown in /var/www/CCBP/htdocs/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 16
Back to top
View user's profile Send private message Send e-mail
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Nov 03, 2016 10:47 pm    Post subject: Reply with quote

jmd8045 wrote:
TEMPLATE:
<script type="text/javascript">
{section name="y" loop=$menu}
var menuitem{$smarty.section.y.iteration} = new menu({$smarty.section.y.max},{$smarty.section.y.iteration},"hidden");
{/section}
</script>

Code:
<script type="text/javascript">
{foreach $menu as $y}
   var menuitem{$y@iteration} = new menu({$y.max},{$y@iteration},"hidden");
{/foreach}
</script>

http://www.smarty.net/docs/en/language.function.foreach.tpl
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP