[Phpmyadmin-devel] duplicate line in libraries/import/shp.php

Madhura Jayaratne madhura.cj at gmail.com
Sun May 6 05:25:22 CEST 2012


On Sun, May 6, 2012 at 3:09 AM, Dieter Adriaenssens <
dieter.adriaenssens at gmail.com> wrote:

> Hi Madhura,
>
> In a file you introduced (libraries/import/shp.php), on line 166, the
> same method with similar parameters is called as the line above :
>
>        function _loadHeaders()
>        {
>            $this->recordNumber = loadData("N", readFromBuffer(4));
>            //We read the length of the record
>            $tmp = loadData("N", readFromBuffer(4));
>            $this->shapeType = loadData("V", readFromBuffer(4));
>        }
>
> nothing happens with the $tmp afterwards, so I'm wondering if this
> duplicate method call can be removed?
> Or is there a reason for calling this method twice?
>
> --
> Kind regards,
>
> Dieter Adriaenssens
>
> Hi Dieter,

Thanks for pointing that out.
The second function call basically read 4 bytes that are not used, so the
pointer is incremented to the required location.
There is not need to assign the content read to a variable, so I've changed
it with commit f286156c8 [1]

[1]
https://github.com/phpmyadmin/phpmyadmin/commit/f286156c8e41f57d2dcccc4bb08cc2ca4ccdec8d

-- 
Thanks and Regards,

Madhura Jayaratne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120506/d320c1ca/attachment.html>


More information about the Developers mailing list