summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-24 15:11:13 +0300
committerAndrew Dolgov <[email protected]>2017-01-24 15:11:13 +0300
commite934d63e0c226d1925e3be5de9e29dc2fb14618c (patch)
tree1d3bbc98a2b15b7a879a0ae14908f11dc1a70e97 /include
parent67268b0017fa7885cf7a1ea6ad9616b76341447a (diff)
fetch_file_contents: rework the way shim works to prevent intermittent warnings
Diffstat (limited to 'include')
-rw-r--r--include/functions.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index 30b9b293a..46f55d4e2 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -348,7 +348,16 @@
if (!is_array($options)) {
// falling back on compatibility shim
- $options = array(
+ $option_names = [ "url", "type", "login", "pass", "post_query", "timeout", "timestamp", "useragent" ];
+ $tmp = [];
+
+ for ($i = 0; $i < func_num_args(); $i++) {
+ $tmp[$option_names[$i]] = func_get_arg($i);
+ }
+
+ $options = $tmp;
+
+ /*$options = array(
"url" => func_get_arg(0),
"type" => @func_get_arg(1),
"login" => @func_get_arg(2),
@@ -357,7 +366,7 @@
"timeout" => @func_get_arg(5),
"timestamp" => @func_get_arg(6),
"useragent" => @func_get_arg(7)
- );
+ ); */
}
$url = $options["url"];