Published WebsiteBaker Portable v10 PHP 8.1.72022-04-16 : read more about…
Published WebsiteBaker 2.13.2 r1332022-04-16 : read more about…
PHP-8.1 released. 2021-11-25PHP-7.4 End Of Life. 2022-11-282021-12-02 : read more about…
[[_englishVersion?url=277]]
© 1999-[[SHOW_YEAR]] Andreas Schmidt
return date('Y');
if (isset($url)) {return '<p style="text-align:right;"><a href="[wblink'.$url.']">english version <img alt="" height="19" src="https://www.hillschmidt.de/wb/media/gif/flag_gbr.gif" width="33" /></a></p>';} else {return '<p style="text-align:right;"><a>english version <img alt="" height="19" src="https://www.hillschmidt.de/wb/media/gif/flag_gbr.gif" width="33" /></a></p>';}
There was an uncatched exceptionpreg_match(): Argument #3 ($matches) cannot be passed by referencein line (57) of (/framework/Utils/IpAddress.php):
Hier die Codes der beiden Droplets (es sind aber auch andere betroffen)SHOW_YEAR:Code: [Select]return date('Y');
$datum = date("Y");return "$datum";
Update auf 2.13.1 bringt folgenden Fehler mit PHP 8 - zeigt aber auch die Droplets unter PHP 7.4 an:Code: [Select]There was an uncatched exceptionpreg_match(): Argument #3 ($matches) cannot be passed by referencein line (57) of (/framework/Utils/IpAddress.php):Dann lasse ich jetzt 2.13.1 r103 und mache ein neues Problem auf. OK?
Ok. Is there a quickfix for this line in IpAddress.php ?
<?php public static function sanitizeIp(string $sRawIp): string { // clean address from netmask/prefix and port $sPattern = '/^[{\[]?([.:a-f0-9]*)(?:\/[0-1]*)?(?:[\]}]?.*)$/im'; $sIpAddress = \preg_replace($sPattern, '$1', $sRawIp); if (\strpos($sIpAddress, ':') === false) { // sanitize IPv4 -------------------------------------------------------------- // if (ip2long($sIpAddress) === false) { throw new \InvalidArgumentException('illegal IPv4 address given!'); } } else { // sanitize IPv6 -------------------------------------------------------------- // // for backard compatibility it also check deprecated addressing where // IP includes a 32 bit IPv4 part and convert this into IPv6 format // sanitize IPv6 -------------------------------------------------------------- // $sPattern = '/^([:a-f0-9]*?)(?:(?:\:)([0-9]{1,3}(?:\.[0-9]{1,3}){3}))?$/is'; $aMatches = []; if (\preg_match($sPattern, $sIpAddress, $aMatches)) { $sIpAddress = $aMatches[1].(isset($aMatches[2]) ? ':'.self::convertV4ToV6($aMatches[2]) : ''); } else { throw new \InvalidArgumentException('illegal IPv6 address given!'); } $sIpAddress = self::expandIpV6($sIpAddress); } return $sIpAddress; }
public static function expandIpV6(string $sIpV6Address): string { $iPos = strpos($sIpV6Address, '::'); if ($iPos !== false) {// $iInserts = 8 - \count(\preg_split('/:/', $sIpV6Address, null, \PREG_SPLIT_NO_EMPTY));// Replaced null with -1 $iInserts = 8 - \count(\preg_split('/:/', $sIpV6Address, -1, \PREG_SPLIT_NO_EMPTY));
Hallo DietmarDer TeilCode, den du gepostet hast, ist laut "Diff Ceck" identisch mit dem TeilCode aus patch 114 in der besagten Datei. Heißt das, dass Patch 114 das Problem fixen würde?
<!-- div align=right><style type="text/css">.textus {color:#777777;font-size:0.8em;font-family:Arial;}</style>There was an uncatched exception<br />Undefined constant "REMOTE_ADDR"<br />in line (28) of (/usonline.php):<br />
getenv('REMOTE_ADDR');