Re: [Wikitech-l] "must be of type int, int given"

2017-05-02 Thread Matthew Flaschen
On 04/17/2017 10:50 PM, Chad wrote: On Mon, Apr 17, 2017 at 2:07 PM Gergo Tisza wrote: On Mon, Apr 17, 2017 at 8:35 PM, Denny Vrandečić wrote: Value returned from function f() must be of type int, int given Have you enabled PHP7 mode

Re: [Wikitech-l] "must be of type int, int given"

2017-04-18 Thread Stas Malyshev
Hi! > Exception handler threw an object exception: TypeError: Argument 2 passed > to stream_set_blocking() must be an instance of int, bool given in > /vagrant/mediawiki/includes/libs/redis/RedisConnectionPool.php:233 This one is weird - second arg of stream_set_blocking should be boolean, e.g.:

Re: [Wikitech-l] "must be of type int, int given"

2017-04-18 Thread Denny Vrandečić
I tried to change the int to a float, easy enough, and the error went away. Just to be replaced with Exception handler threw an object exception: TypeError: Argument 2 passed to stream_set_blocking() must be an instance of int, bool given in

Re: [Wikitech-l] "must be of type int, int given"

2017-04-18 Thread Denny Vrandečić
Indeed, it seems your right - if I namespace the thing, the compiler actually tells me that namespace/int is not the same as int. So yeah, it probably assumes a type int here, which has no relation to the built-in scalar int. D'oh. I didn't realize until know that one wasn't allowed to use type

Re: [Wikitech-l] "must be of type int, int given"

2017-04-18 Thread Denny Vrandečić
That would be neat! On Mon, Apr 17, 2017 at 7:51 PM Chad wrote: > On Mon, Apr 17, 2017 at 2:07 PM Gergo Tisza wrote: > > > On Mon, Apr 17, 2017 at 8:35 PM, Denny Vrandečić > > wrote: > > > > > Value returned from function

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Stas Malyshev
Hi! > So, if I start a fresh MediaWiki Vagrant installation, and the vagrant ssh > into the virtual machine, the fastest way to reproduce the issue is to > start hhvmsh and type > > function f():int { return 1; }; Suspicion: HHVM thinks "int" is a class name, not primitive type name. Not sure

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Chad
On Mon, Apr 17, 2017 at 2:07 PM Gergo Tisza wrote: > On Mon, Apr 17, 2017 at 8:35 PM, Denny Vrandečić > wrote: > > > Value returned from function f() must be of type int, int given > > > Have you enabled PHP7 mode >

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Chad
On Mon, Apr 17, 2017 at 3:07 PM Denny Vrandečić wrote: > Ah, that's a good point! Sorry, stupid error. > > I think I did it now - adding to > mediawiki-vagrant/puppet/hieradata/common.yaml (I hope that is the right > approach). > > Now I get the following error, which seems

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Denny Vrandečić
Ah, that's a good point! Sorry, stupid error. I think I did it now - adding to mediawiki-vagrant/puppet/hieradata/common.yaml (I hope that is the right approach). Now I get the following error, which seems unrelated to my extension. Hm. Apr 17 21:48:57 mediawiki-vagrant hhvm[29575]:

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Gergo Tisza
On Mon, Apr 17, 2017 at 8:35 PM, Denny Vrandečić wrote: > Value returned from function f() must be of type int, int given Have you enabled PHP7 mode ? ___

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Denny Vrandečić
The same works with bool too. I am glad I don't have to write (bool)true :) On Mon, Apr 17, 2017 at 1:19 PM Denny Vrandečić wrote: > Hm. If I try it in https://3v4l.org/WOTg0 I actually get good behavior > for HHMV 3.12.14 - so it might be something problematic with our

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Denny Vrandečić
Hm. If I try it in https://3v4l.org/WOTg0 I actually get good behavior for HHMV 3.12.14 - so it might be something problematic with our deployed HHMV version? On Mon, Apr 17, 2017 at 1:16 PM Denny Vrandečić wrote: > Thanks for the suggestion, but I get exactly the same

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread יגאל חיטרון
)-: On Apr 17, 2017 23:16, "Denny Vrandečić" wrote: > Thanks for the suggestion, but I get exactly the same error message when I > try to typecast the 1 to int first. > > ‪On Mon, Apr 17, 2017 at 11:56 AM ‫יגאל חיטרון‬‎ > wrote:‬ > > > I'm not so good in

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread Denny Vrandečić
Thanks for the suggestion, but I get exactly the same error message when I try to typecast the 1 to int first. ‪On Mon, Apr 17, 2017 at 11:56 AM ‫יגאל חיטרון‬‎ wrote:‬ > I'm not so good in this, but try {return (int)1;} . Maximum, I'm wrong. > Igal > > On Apr 17, 2017 21:36,

Re: [Wikitech-l] "must be of type int, int given"

2017-04-17 Thread יגאל חיטרון
I'm not so good in this, but try {return (int)1;} . Maximum, I'm wrong. Igal On Apr 17, 2017 21:36, "Denny Vrandečić" wrote: > I'm running into a weird problem, which made me reset my whole vagrant. > > I assume this is not strictly a MediaWiki issue, but probably an HHVM >