Forum Bugs

Error in php library

JonoB
The current php lib has a function convert_multiple_files_to_passthru:

    public function convert_multiple_files_to_passthru($xmlPaths)
    {
        $pathAndArgs = $this->getCommandLine();
        $pathAndArgs .= '--silent "';

        foreach ($xmlPaths as $xmlPath)
        {
            $pathAndArgs .= '"' . $xmlPath . '" ';
        }
        $pathAndArgs .= '-o -';

        return $this->convert_internal_file_to_passthru($pathAndArgs);
    }


However, this will cause Prince to fail due to the extra " after the --silent flag. This will generate two double inverted commas next to eachother, which is obviously invalid.

To correct this, replace the following line:
$pathAndArgs .= '--silent "';


with this:
$pathAndArgs .= '--silent ';


I believe that this error crept in when this method was first created in the php wrapper, as it was copied from the convert_files_to_passthru method.
mikeday
Thanks for the pointer, we'll fix that immediately! :oops:
mikeday
Today we have released a new version of the Prince PHP wrapper that fixes this issue, thanks again for letting us know! :)