Skip to content
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

"Undefined offset: 1" #6

Open
spiceup-it opened this issue Jun 8, 2018 · 1 comment
Open

"Undefined offset: 1" #6

spiceup-it opened this issue Jun 8, 2018 · 1 comment

Comments

@spiceup-it
Copy link

C:\laragon\www\Lb\vendor\laravel\framework\src\Illuminate\View\Compilers\Concerns\CompilesLoops.php
*
* @param string $expression
* @return string
*/
protected function compileFor($expression)
{
return "";
}

/**
 * Compile the for-each statements into valid PHP.
 *
 * @param  string  $expression
 * @return string
 */
protected function compileForeach($expression)
{
    preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches);

    $iteratee = trim($matches[1]);

    $iteration = trim($matches[2]);

    $initLoop = "\$__currentLoopData = {$iteratee}; \$__env->addLoop(\$__currentLoopData);";

    $iterateLoop = '$__env->incrementLoopIndices(); $loop = $__env->getLastLoop();';

    return "<?php {$initLoop} foreach(\$__currentLoopData as {$iteration}): {$iterateLoop} ?>";
}

/**
 * Compile the break statements into valid PHP.
 *
 * @param  string  $expression
 * @return string
 */
protected function compileBreak($expression)
{
    if ($expression) {
        preg_match('/\(\s*(-?\d+)\s*\)$/', $expression, $matches);

Arguments
"Undefined offset: 1"

@chepe263
Copy link

what was the url/route you visited when this error happened?

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

No branches or pull requests

2 participants