vikash002 / rock-php

Automatically exported from code.google.com/p/rock-php
0 stars 0 forks source link

Little bug in json_format function #217

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to update some record with a value like this 
"main(x15]): div.c225"

The update dialog just doesn't appear.

In the
app\funcs\functions.php
line 197
$indent_level variable goes negative and next line raises:

Warning: str_repeat(): Second argument has to be greater than or equal to 0 in 
L:\Downloads\rockmongo-on-windows-v0.0.4\rockmongo-on-windows\web\rockmongo\app\
funcs\functions.php on line 198

Adding 
if ($indent_level < 0) $indent_level = 0;
after $indent_level--;
helped me.

Original issue reported on code.google.com by yura....@gmail.com on 16 Aug 2012 at 5:07