PHP Classes

Error in main class

Recommend this page to a friend!

      PHP PDF to Text  >  All threads  >  Error in main class  >  (Un) Subscribe thread alerts  
Subject:Error in main class
Summary:line 1236, 2016-08-09
Messages:6
Author:Fernando Hagihara
Date:2016-08-09 17:48:45
 

  1. Error in main class   Reply   Report abuse  
Picture of Fernando Hagihara Fernando Hagihara - 2016-08-09 17:48:45
Parse error: syntax error, unexpected '|', expecting ']' in PdfToText.phpclass on line 1236

  2. Re: Error in main class   Reply   Report abuse  
Picture of Christian Vigh Christian Vigh - 2016-08-09 18:50:21 - In reply to message 1 from Fernando Hagihara
what is your php version ?

  3. Re: Error in main class   Reply   Report abuse  
Picture of Fernando Hagihara Fernando Hagihara - 2016-08-09 19:35:03 - In reply to message 2 from Christian Vigh
It is 5.5.9

  4. Re: Error in main class   Reply   Report abuse  
Picture of Christian Vigh Christian Vigh - 2016-08-09 20:21:39 - In reply to message 3 from Fernando Hagihara
Hello Fernando,

thanks for your feedback. In fact, I was initializing an array with things like :

[ 'a' => CTYPE_ALNUM | CTYPE_XDIGIT, ... ]

However, I forgot that bitwise operators such as "|" or "&" in initializations are allowed only for PHP versions >= 5.6 (well, this is the same also for arithmetic operators).

I made a quick version 1.2.40, which should now work with your PHP version 5.5.9. Just download the .ZIP file again.

Please let me know if you have any other issue,
Christian.


  5. Re: Error in main class   Reply   Report abuse  
Picture of marco antonio costa rosa marco antonio costa rosa - 2016-08-12 15:04:09 - In reply to message 1 from Fernando Hagihara
Fatal error: Unsupported operand types in PdfToText.php on line 3807

  6. Re: Error in main class   Reply   Report abuse  
Picture of Christian Vigh Christian Vigh - 2016-08-12 15:15:07 - In reply to message 5 from marco antonio costa rosa
ok, until I include this patch in the next release, simply modify line #3807 and replace :

$RangeMax = -PHP_INT_MAX ;

with :

$RangeMax = -1 ;