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?
On Sun, May 6, 2012 at 3:09 AM, Dieter Adriaenssens < dieter.adriaenssens@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/f286156c8e41f57d2dcccc4bb08c...