Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Undefined offset: 3 #5

Closed
Excas opened this issue Sep 18, 2016 · 3 comments
Closed

Undefined offset: 3 #5

Excas opened this issue Sep 18, 2016 · 3 comments

Comments

@Excas
Copy link

Excas commented Sep 18, 2016

protected function compileStatements($value)
{
$callback = function ($match) {
if (strpos($match[1], '@') !== false) {
$match[0] = isset($match[3]) ? $match[1].$match[3] : $match[1];
} elseif (isset($this->customDirectives[$match[1]])) {
$match[0] = call_user_func($this->customDirectives[$match[1]], ($match[3] ?: ''));
} elseif (method_exists($this, $method = 'compile'.ucfirst($match[1]))) {
$match[0] = $this->$method(($match[3] ?: ''));
}

    return isset($match[3]) ? $match[0] : $match[0].$match[2];
};

return preg_replace_callback('/\B@(@?\w+)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', $callback, $value);

}
xiaoler\blade\src\Compilers\BladeCompiler.php 248 line

@xleliu
Copy link
Owner

xleliu commented Sep 18, 2016

好的 我尽快看一下

@xleliu
Copy link
Owner

xleliu commented Sep 18, 2016

@Excas fixed

@Excas
Copy link
Author

Excas commented Sep 19, 2016

给力!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants