thiagoalessio / tesseract-ocr-for-php

A wrapper to work with Tesseract OCR inside PHP.
https://packagist.org/packages/thiagoalessio/tesseract_ocr
MIT License
2.87k stars 551 forks source link

Fixed version comparison when current version has "v" prefix. #177

Closed den1n closed 4 years ago

den1n commented 4 years ago

When library requests version of tesseract executable on Windows it may receive version with "v" prefix. For example "v5.0.0-alpha.20191030".

image

PHP function version_compare() returns incorrect result because of prefix.

image

In this PR i just remove "v" prefix from version number if it found.

thiagoalessio commented 4 years ago

@den1n awesome!! thanks a lot for taking the time to contribute :+1: :1st_place_medal: :100: :heart:

I'll merge it as soon as I'm back from work and release a new version with your fix!

thiagoalessio commented 4 years ago

done, your changes are part of version 2.9.1, thanks again!

den1n commented 4 years ago

Thank you!