Skip to content

"Undefined offset: 1" #6

@spiceup-it

Description

@spiceup-it

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions