laminas / laminas-escaper

Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs
https://docs.laminas.dev/laminas-escaper/
BSD 3-Clause "New" or "Revised" License
191 stars 20 forks source link

rawurlencode() expects parameter 1 to be string, bool given in Escaper.php:246 #24

Closed purpletreesoft closed 3 years ago

purpletreesoft commented 3 years ago

The latest version passes int argument to rawurlencode, where string is expected.

problem is at line 246:

return rawurlencode($string);

possible solution:

return rawurlencode(strval($string));

purpletreesoft commented 3 years ago

This issue was observed in Magento 2 CE, when the latest Laminas was pulled.

purpletreesoft commented 3 years ago

I see another issue related to strict checks introduced. Perhaps that commit fixes this issue too?

froschdesign commented 3 years ago

Duplicate of #20

See also: https://github.com/laminas/laminas-escaper/issues/21#issuecomment-868542534