PHP警告:DOMDocument :: loadHTML():htmlParseEntityRef:expecting';' 在实体

the problem is this: if I run the script from the console

C:\Users\Dima>php C:\wamp\www\shop\index.php "test" 2

then there is a bug:

PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 802 in C:\wamp\wwwozetka\app.php on line 40 

index.php

if(isset($argv[1]) && isset($argv[1])){
    return new App((string)$argv[1], (int)$argv[2]);
}

and if just run in a browser index.php

$app = new App('test', 2);

so the application works fine, no errors please help launch the application from the console, and I'm sorry for my english

You probably have an HTML file being referenced by "test" that is being used by new App(), however that HTML file contains errors. Most likely (almost certain) cause is something like <a href="sompage.php?foo=bar&cat=fish">Link</a>. The & in the HREF introduces a character entity, but there is no ; to go with it.