algorys / gitlabproject

Dokuwiki plugin to display a Gitlab project
3 stars 4 forks source link

Illegal String Offset error in logs #11

Open marrek-az opened 5 years ago

marrek-az commented 5 years ago

PHP message: PHP Warning: Illegal string offset 'username' in /usr/share/nginx/dokuwiki/lib/plugins/gitlabproject/syntax.php on line 141 PHP message: PHP Warning: Illegal string offset 'access_level' in /usr/share/nginx/dokuwiki/lib/plugins/gitlabproject/syntax.php on line 142" while reading upstream, client: X.X.X.X, server: wiki.example.com, request: "GET /playground:test HTTP/1.1", upstream: "fastcgi://unix:/tmp/wiki.sock:", host: "wiki.example.com"

marrek-az commented 5 years ago

This is php-fpm 7.2

algorys commented 5 years ago

I've made a fresh install with following:

The only warnings I had are the following:

PHP message: PHP Warning:  Use of undefined constant Reporter - assumed 'Reporter' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/gitlabproject/gitlab/gitlab.php on line 89
PHP message: PHP Warning:  Use of undefined constant Developer - assumed 'Developer' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/gitlabproject/gitlab/gitlab.php on line 90
PHP message: PHP Warning:  Use of undefined constant Master - assumed 'Master' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/gitlabproject/gitlab/gitlab.php on line 91
PHP message: PHP Warning:  Use of undefined constant Owner - assumed 'Owner' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/gitlabproject/gitlab/gitlab.php on line 92
PHP message: PHP Warning:  Use of undefined constant Guest - assumed 'Guest' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/gitlabproject/gitlab/gitlab.php on line 88

I will make a release to make corrections for that.

But I do not have the warnings that you have... @shoshin71 please give me your install versions.

marrek-az commented 5 years ago

I'm using:

The environment looks similar to your fresh install, at least from a version standpoint. There may be another plugin causing problems, which I will try to track down. I just pulled the latest copy from your repo, and the errors persist.

algorys commented 5 years ago

It may be due to the version of Gitlab too.

Which version do you use? And the version of the Gitlab API (v3 or v4) ?

marrek-az commented 5 years ago

Sorry for the delay. I'm running 11.6.3-ce.0, but it looks like it was still set at the v3 API.

algorys commented 5 years ago

Hm ok, strange behavior... I'm currently working on two Gitlab server and I have no error:

GitLab 10.0.6
GitLab Shell 5.9.0
GitLab Workhorse v3.0.0
GitLab API v4
Git 2.20.1
Ruby 2.3.1p112
Rails 4.2.8
postgresql 9.5.14

and

GitLab 9.0.7
GitLab Shell 5.0.0
GitLab Workhorse v1.4.2
GitLab API v4
Git 2.7.4
Ruby 2.3.1p112
Rails 4.2.8
postgresql 9.5.14

But API version is v4... I'll try to update to v11.x and reproduce the error.

And I'll add possibility to choose Gitlab API version in settings (see #8).