Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Function include #18

Open
Hikari974 opened this issue Mar 28, 2014 · 7 comments
Open

Function include #18

Hikari974 opened this issue Mar 28, 2014 · 7 comments
Assignees
Labels

Comments

@Hikari974
Copy link

Bug using function {include} 2 times in the same template.
Only if the compiled folder is empty.

The first include use Autoloader::loadFunction,
the second use Autoloader::__autoloadClass and send an error : Cannot redeclare Dwoo\Plugins\Functions\functionInclude().

The second time the function exist but not the class.

I solve the problem with require_once in Autoloader::__autoloadClass.

@emulienfou
Copy link
Contributor

Update full dwoo source and tell me if you have the same bug ?

@Hikari974
Copy link
Author

The problem is solved, but now I have some issue with my autoloader(priority I guess). I work on it and make you a feed back.

@MartinMuzatko
Copy link

I got the same issue.

@emulienfou emulienfou reopened this Jul 11, 2014
@postaczech
Copy link

I got the same issue with include in templates ... Cannot redeclare Dwoo\Plugins\Functions\functionInclude().

@emulienfou
Copy link
Contributor

First of all, I think you need to update your dwoo's sources, because functionInclude as now a first letter as uppercase such as FunctionInclude.

All the tests I've done, I can't reproduce the problem in my environment, so can you tell me if you use .use the dwoo's autoloader or do you use your personal autoloader?

Thanks!

@emulienfou emulienfou self-assigned this Oct 20, 2014
@postaczech
Copy link

I use latest version of Dwoo and I use standard Dwoo Autoloader. When I want include two tpl files in my template, I see error:

Example 1 :

page.tpl

{include "another.tpl"}

Example 2:

page.tpl

{include "another.tpl"}
{include "another.tpl"}

I see error, Fatal error: Cannot redeclare Dwoo\Plugins\Functions\functionInclude() (previously declared in C:\wamp\www\modern\libs\Dwoo\Plugins\Functions\functionInclude.php:29) in C:\wamp\www\modern\libs\Dwoo\Plugins\Functions\functionInclude.php on line 88

emulienfou pushed a commit that referenced this issue Sep 10, 2016
@emulienfou emulienfou modified the milestones: 1.3.0, 2.0 Sep 10, 2016
@emulienfou emulienfou added the bug label Sep 10, 2016
@emulienfou
Copy link
Contributor

Need to be tested in final 1.3.0

@emulienfou emulienfou modified the milestone: 1.3.1 Dec 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants