phpfmt_stable icon indicating copy to clipboard operation
phpfmt_stable copied to clipboard

Undefined offset: 52 in phar

Open rajneeshojha opened this issue 8 years ago • 2 comments

for this piece of code

 if(is_array($default))
                {
                    if(( isset($default[$n]) )
                    {
                        $d=$default[$n];
                    }
                    else
                    {
                        $d=null;
                    }
                } 

is giving error

Format error:
Notice: Undefined offset: 52 in phar://Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/lib/phpbeautifier/fmt.phar/fmt.stub.php on line 3184

rajneeshojha avatar Jun 19 '16 18:06 rajneeshojha

Hello rajneeshojha, thank you for including the code that the fmt.phar is failing on.

I'll need to obtain a version of the fmt.phar source code to take a look at what's causing this issue and reproduce it on a mac then update the code.

nanch avatar Jun 20 '16 05:06 nanch

it is failing for only missing bracket

if(( true )
                    { 
                    }
                    else
                    {
                    }

rajneeshojha avatar Jun 20 '16 07:06 rajneeshojha