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

Function include #18

Open
Open

Description

@Hikari974

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.

Activity

  1. emulienfou commented on May 27, 2014

    @emulienfou
    Contributor

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

  2. Hikari974 commented on May 28, 2014

    @Hikari974
    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.

  3. MartinMuzatko commented on Jul 11, 2014

    @MartinMuzatko

    I got the same issue.

  4. postaczech commented on Oct 20, 2014

    @postaczech

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

  5. emulienfou commented on Oct 20, 2014

    @emulienfou
    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!

  6. self-assigned this
    on Oct 20, 2014
  7. postaczech commented on Oct 20, 2014

    @postaczech

    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

  8. added a commit that references this issue on Sep 10, 2016
  9. modified the milestones: , 2.0 on Sep 10, 2016
  10. emulienfou commented on Sep 10, 2016

    @emulienfou
    Contributor

    Need to be tested in final 1.3.0

  11. modified the milestone: 1.3.1 on Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions