swotphp icon indicating copy to clipboard operation
swotphp copied to clipboard

TypeError when using Swot::isAcademic()

Open jmecahansen opened this issue 2 years ago • 1 comments

Hi,

I want to integrate your library in a small framework I'm building with PHP 8.1 but, when using the isAcademic() method it gives me the following error:

TypeError : array_key_exists(): Argument #2 ($array) must be of type array, Pdp\PublicSuffixList given

I suppose this is connected to #21 as it's related to the same package but I don't know if it's a matter of upgrading the package dependency for jeremykendall/php-domain-parser or upgrading your library (or maybe both). In any case, could you take a look? :)

Kind regards, Julio

jmecahansen avatar May 28 '22 17:05 jmecahansen

That problem is caused by changes in array_key_exists() function. jeremykendall/php-domain-parser is not good for php 8.1. Instead i suggest use my fork of Swot - prepared for php 8.1 https://github.com/xTermy/studentMailVerifier

xTermy avatar Jan 15 '23 19:01 xTermy