nanch / phpfmt_stable

This is a stable snapshot (version 6125cf9) of the phpfmt plugin for Sublime Text
143 stars 34 forks source link

Undefined offset: 52 in phar #1

Open rajneeshojha opened 8 years ago

rajneeshojha commented 8 years ago

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
nanch commented 8 years ago

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.

rajneeshojha commented 8 years ago

it is failing for only missing bracket

if(( true )
                    { 
                    }
                    else
                    {
                    }