Argument 7 not passed to function

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
dariottolo
Bear Rating Trainee
Bear Rating Trainee
Posts: 27
Joined: 05 Jul 2014, 18:57

Argument 7 not passed to function

Postby dariottolo » 11 Jun 2016, 15:13

Hi all,

I am using the lastest git updated version of TT-Rss, on PHP 5.6.20 and PostgreSQL 9.4.7.

Attached is the dump of my "ttrss_error_log" table .

At some random times I find the entry in subject.

Any idea what might be the cause?

Thank you in advance.

Regards

Dario
Attachments
dump.zip
(1.32 KiB) Downloaded 79 times

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 11 Jun 2016, 15:55

the cause is that your php ignores error suppression (@ operator) used in that specific line for some reason. could be something in php.ini, idk really.

good news that it does not affect anything at all so you can just ignore this warning.

e: you can try adding @ above i.e.

Code: Select all

         $options = @array(
               "url" => func_get_arg(0),
               "type" => @func_get_arg(1),
               "login" => @func_get_arg(2),
               "pass" => @func_get_arg(3),
               "post_query" => @func_get_arg(4),
               "timeout" => @func_get_arg(5),
               "timestamp" => @func_get_arg(6),
               "useragent" => @func_get_arg(7)
         );


report back if it helps

dariottolo
Bear Rating Trainee
Bear Rating Trainee
Posts: 27
Joined: 05 Jul 2014, 18:57

Re: Argument 7 not passed to function

Postby dariottolo » 11 Jun 2016, 17:07



I think I edited /include/functions correctly.

Will report if it works or not.

So far no error in the logs.

dariottolo
Bear Rating Trainee
Bear Rating Trainee
Posts: 27
Joined: 05 Jul 2014, 18:57

Re: Argument 7 not passed to function

Postby dariottolo » 12 Jun 2016, 12:51

Just a quick update. I am pretty sure that Feed Debugger triggers the error.

If I run fD on any feed, with or without forcing refetch and rehash, once it completes, there is a new error in the error_log.

As you previously wrote, it does not break anything, so I will empty the logs every now and then.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 12 Jun 2016, 13:47

doesn't happen here :(

ManuelW
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 30 Apr 2013, 18:16

Re: Argument 7 not passed to function

Postby ManuelW » 20 Oct 2016, 09:25

I get this error too on php5.5 and php5.6

E_WARNING (2) include/functions.php:359 func_get_arg(): Argument 7 not passed to function

It is spamming my error log

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 20 Oct 2016, 09:45

you might want to check your php configuration if @ (suppress warnings) operator is for some reason not working correctly on your install

as far as i can see there's no bug to be fixed here in tt-rss

e: if there's a stack trace post it here

toomanyaccounts
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 22 Dec 2016, 14:07

Re: Argument 7 not passed to function

Postby toomanyaccounts » 22 Dec 2016, 14:11

Same problem, can't figure out why.

Could this be an issue with php7?

Using almost vanilla configuration (just activated some extra extensions, nothing exotic).

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 22 Dec 2016, 14:40

i'm on php7 and i don't get this warning

please investigate if you can

e: it would also help extremely if you could just play with @ operator in that location where error occurs to see if some placement magically fixes it (lol php)

toomanyaccounts
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 22 Dec 2016, 14:07

Re: Argument 7 not passed to function

Postby toomanyaccounts » 22 Dec 2016, 21:44

Tried "debug-feed" on all feeds - but no "Argument 7 warning"... unless I did something wrong:

Code: Select all

$ echo "use ttrss; select id from ttrss_feeds;" | mysql | while read feed; do echo "feed: $feed"; php update.php --debug-feed $feed | grep "Argument 7 ";  done;

Wait, php warnings go to std that way, right? Aaah, doesn't matter. Haven't been able to figure out how @'s work. Or php for that matter.

Why use those @'s anyway? Doesn't something like this work instead?

Code: Select all

$opt_list = ["url", "type", "login", "pass", "post_query", "timeout", "timestamp", "useragent"];
$arg_list = func_get_args();
$options = array();
foreach ($arg_list as $key => $value) {
   $options[$opt_list[$key]] = $value;
}

( Tried it briefly and nothing caught fire. So far.... )

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 22 Dec 2016, 21:59

@ prefix is basically "no warnings on this please" and yet for some people it doesn't work, no idea why

toomanyaccounts
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 22 Dec 2016, 14:07

Re: Argument 7 not passed to function

Postby toomanyaccounts » 26 Dec 2016, 01:46

Still works fine with the changed code, no more log spam, haven't noticed any side-effect, so I guess that did the trick.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 26 Dec 2016, 16:07

it works i guess but its way less readable this way

i would prefer the offending php setting or w/e to be identified although i guess not this time

toomanyaccounts
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 22 Dec 2016, 14:07

Re: Argument 7 not passed to function

Postby toomanyaccounts » 31 Dec 2016, 15:09

Unless I misunderstood the documentation, the ttrss custom error handler globally disables error suppression (include/errorhandler.php:37):

Code: Select all

if (error_reporting() == 0 || !$errno) return false;


Assuming "!$errno" is supposed to be "mute" too, something like this should work:

Code: Select all

if (error_reporting() === 0 || !$errno) return 0;

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Argument 7 not passed to function

Postby fox » 31 Dec 2016, 16:00

please elaborate on why have you decided to make these changes and how is error suppression being disabled because i don't get it

1. error_reporting() returns an integer, why add === there?
2. handler function returns a boolean as per php documentation (set_error_handler()) which you are changing to 0 for some reason

e: i mean the example of the handler function is literally right there in the docs ffs


Return to “Support”

Who is online

Users browsing this forum: No registered users and 10 guests