Compare commits

...

7 Commits

Author SHA1 Message Date
Basemaster a58813915b
Update Composer 2024-08-26 09:51:13 +03:00
Basemaster 792a106a78
Update composer.json 2024-08-22 13:33:49 +03:00
Basemaster 75c440c4bd
PHP8 change each() to foreach() 2024-08-22 13:18:34 +03:00
Almaz 4886f1e645 added tag 2019-08-06 14:23:02 +03:00
Basemaster 9ed7446c3a
Update composer.json 2019-08-06 14:12:35 +03:00
Basemaster 9a0ed339e6
updated version 2019-08-06 14:12:22 +03:00
Basemaster b1a2456fad
updated for packgist 2019-08-06 14:03:33 +03:00
3 changed files with 26 additions and 14 deletions

View File

@ -1,4 +1,4 @@
snoopy
======
hello!
fork http://sourceforge.net/projects/snoopy/

View File

@ -1,7 +1,8 @@
{
"name": "basemaster/snoopy",
"description": "snoopy",
"license": "GPLv2",
"license": "GPL-2.0-or-later",
"version": "2.0.2",
"authors": [
{
"name": "Clientbase"

View File

@ -195,7 +195,8 @@ class Snoopy
$frameurls = $this->_frameurls;
$this->_frameurls = [];
while (list(, $frameurl) = each($frameurls))
//while (list(, $frameurl) = each($frameurls))
foreach ($frameurls as $frameurl)
{
if ($this->_framedepth < $this->maxframes)
{
@ -327,7 +328,8 @@ class Snoopy
$frameurls = $this->_frameurls;
$this->_frameurls = [];
while (list(, $frameurl) = each($frameurls))
//while (list(, $frameurl) = each($frameurls))
foreach ($frameurls as $frameurl)
{
if ($this->_framedepth < $this->maxframes)
{
@ -603,7 +605,8 @@ class Snoopy
// catenate the non-empty matches from the conditional subpattern
while (list($key, $val) = each($links[2]))
//while (list($key, $val) = each($links[2]))
foreach ($links[2] as $key => $val)
{
if (!empty($val))
{
@ -611,7 +614,8 @@ class Snoopy
}
}
while (list($key, $val) = each($links[3]))
//while (list($key, $val) = each($links[3]))
foreach ($links[3] as $key => $val)
{
if (!empty($val))
{
@ -833,7 +837,8 @@ class Snoopy
{
$this->rawheaders = (array) $this->rawheaders;
}
while (list($headerKey, $headerVal) = each($this->rawheaders))
//while (list($headerKey, $headerVal) = each($this->rawheaders))
foreach ($this->rawheaders as $headerKey => $headerVal)
{
$headers .= $headerKey . ": " . $headerVal . "\r\n";
}
@ -1165,11 +1170,13 @@ class Snoopy
{
case "application/x-www-form-urlencoded":
reset($formvars);
while (list($key, $val) = each($formvars))
//while (list($key, $val) = each($formvars))
foreach ($formvars as $key => $val)
{
if (is_array($val) || is_object($val))
{
while (list($cur_key, $cur_val) = each($val))
//while (list($cur_key, $cur_val) = each($val))
foreach ($val as $cur_key => $cur_val)
{
$postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
}
@ -1185,11 +1192,13 @@ class Snoopy
$this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));
reset($formvars);
while (list($key, $val) = each($formvars))
//while (list($key, $val) = each($formvars))
foreach ($formvars as $key => $val)
{
if (is_array($val) || is_object($val))
{
while (list($cur_key, $cur_val) = each($val))
//while (list($cur_key, $cur_val) = each($val))
foreach ($val as $cur_key => $cur_val)
{
$postdata .= "--" . $this->_mime_boundary . "\r\n";
$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
@ -1205,10 +1214,12 @@ class Snoopy
}
reset($formfiles);
while (list($field_name, $file_names) = each($formfiles))
//while (list($field_name, $file_names) = each($formfiles))
foreach ($formfiles as $field_name => $file_name)
{
settype($file_names, "array");
while (list(, $file_name) = each($file_names))
//while (list(, $file_name) = each($file_names))
foreach ($file_names as $file_name)
{
if (!is_readable($file_name))
{