New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Close Tag for Autotag that Uses Replace PHP and a Function #6

Closed
eSilverStrike opened this Issue Jul 26, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@eSilverStrike
Member

eSilverStrike commented Jul 26, 2017

Replace PHP Autotags with a function could not access $p3 since it wasn't passed. See commit:

ivywe/geeklog-ivywe@67588e5

Replace line (412):
$replace = $function($p1, $p2, $autotag['tagstr']);
With:

                        $reffunc = new ReflectionFunction($function); 
                        if (isset($p3) && $reffunc->getNumberOfParameters() >= 4) { 
                            $replace = $function($p1, $p2, $autotag['tagstr'], $p3); 
                        } else { 
                            $replace = $function($p1, $p2, $autotag['tagstr']); 
                        } 

@eSilverStrike eSilverStrike added the bug label Jul 26, 2017

@eSilverStrike eSilverStrike modified the milestones: 1.1.1, 1.1.2 Jul 26, 2017

@eSilverStrike eSilverStrike changed the title from Fix for Close Tag for Autotag that Uses Replace PHP to Fix for Close Tag for Autotag that Uses Replace PHP and a Function Aug 15, 2017

eSilverStrike added a commit that referenced this issue Aug 15, 2017

Fixed Closed tags being used with Replace with PHP for functions
Fix for issue #6. Updated english language file to explain more about
php functions that can be used .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment