Menu

#2792 (ok 3.0.2) Assigning a value in import.php?

3.0.0
fixed
1
2013-06-11
2008-11-04
Glen Arason
No

Hi

File: import.php
This simply doesn't make any sense to me.

202 // In case no memory limit we work on 10MB chunks
203 if ($memory_limit = -1) {
204 $memory_limit = 10 * 1024 * 1024;
205 }

Shouldn't line 203 be:
if ($memory_limit == -1)

There is no reason that I can see why one couldn't assign -1 to the variable. I have to assume this is supposed to be ==.

Glen

Discussion

  • Marc Delisle

    Marc Delisle - 2008-11-04
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-11-04

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2008-11-04
    • priority: 5 --> 1
    • summary: Assigning a value in import.php? --> (ok 3.0.2) Assigning a value in import.php?
    • status: open --> open-fixed
     
  • Jürgen Wind

    Jürgen Wind - 2008-11-07

    that's why *I* have the habbit to write:
    if ( -1 == $memory_limit ) {
    ...
    ;)

     
  • Marc Delisle

    Marc Delisle - 2008-11-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB