patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
http://TheBookOfShaders.com
Other
6.08k stars 690 forks source link

needed a null check in parsedown.php #375

Open unmodify opened 2 years ago

unmodify commented 2 years ago

Love the project, all the best:

$line was null, which hurt my php.
So, my fix: line num #144 in Parsedown.php: foreach ($parts as $part) { $lineLength=0; if ($line) { $lineLength = mb_strlen($line, 'utf-8'); } $shortage = 4 - $lineLength % 4;

$line .= str_repeat(' ', $shortage);
$line .= $part;

}