{"action":"created","issue":{"url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/458","repository_url":"https://api.github.com/repos/maths/moodle-qtype_stack","labels_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/458/comments","events_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/458/events","html_url":"https://github.com/maths/moodle-qtype_stack/issues/458","id":435852632,"node_id":"MDU6SXNzdWU0MzU4NTI2MzI=","number":458,"title":"PHP syntax error on multiple line string concatenation in a property assignment of the file lang/multilang.php","user":{"login":"leonardodeconti","id":46637177,"node_id":"MDQ6VXNlcjQ2NjM3MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/46637177?v=4","gravatar_id":"","url":"https://api.github.com/users/leonardodeconti","html_url":"https://github.com/leonardodeconti","followers_url":"https://api.github.com/users/leonardodeconti/followers","following_url":"https://api.github.com/users/leonardodeconti/following{/other_user}","gists_url":"https://api.github.com/users/leonardodeconti/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardodeconti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardodeconti/subscriptions","organizations_url":"https://api.github.com/users/leonardodeconti/orgs","repos_url":"https://api.github.com/users/leonardodeconti/repos","events_url":"https://api.github.com/users/leonardodeconti/events{/privacy}","received_events_url":"https://api.github.com/users/leonardodeconti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-04-22T19:17:29Z","updated_at":"2019-04-23T12:38:55Z","closed_at":null,"author_association":"NONE","body":"Hello Dears,\r\n\r\nFirst, thanks you guys for your efforts to do this amazing plugin!\r\n\r\nWell, after I did an update of the STACK plugin to the version \"4.2.1 for Moodle 3.0+\" I got the following error when I load the page \"Question bank\" (https://URL/question/edit.php?courseid=1):\r\n\r\n> PHP Parse error:  syntax error, unexpected '.', expecting ',' or ';' in /pathto/moodle/question/type/stack/lang/multilang.php on line 37, referer: https://URL/question/edit.php?courseid=1\r\n\r\nAt line 37 of multilang.php file we have the following string concatenation divided in two lines in a property assignment:\r\n```\r\nprivate $search = '/(<span(\\s+lang=\"[a-zA-Z0-9_-]+\"|\\s+class=\"multilang\"){2}\\s*>.*?<\\/span>)'\r\n\t\t\t. '(\\s*<span(\\s+lang=\"[a-zA-Z0-9_-]+\"|\\s+class=\"multilang\"){2}\\s*>.*?<\\/span>)+/is';\r\n\r\n```\r\nSo I have removed the string concatenation making a \"straight assignment\":\r\n`private $search = '/(<span(\\s+lang=\"[a-zA-Z0-9_-]+\"|\\s+class=\"multilang\"){2}\\s*>.*?<\\/span>)(\\s*<span(\\s+lang=\"[a-zA-Z0-9_-]+\"|\\s+class=\"multilang\"){2}\\s*>.*?<\\/span>)+/is';`\r\n\t\r\nand the error gone out!\r\n\r\nI suspect the error occurs because I have an old version of PHP:\r\n\r\n> $ php --version\r\n> PHP 5.5.9-1ubuntu4.26 (cli) (built: Sep 17 2018 13:46:30) \r\n\r\nBut my Moodle version is 3.1.17 that requires PHP 5.4.4+ ... so I think I'm not incompatible with [Moodle Server requirements](https://docs.moodle.org/dev/Moodle_3.1_release_notes#Server_requirements).\r\n\r\nMaybe we have a bug because of incompatibilities between PHP versions ?"},"comment":{"url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/comments/485785126","html_url":"https://github.com/maths/moodle-qtype_stack/issues/458#issuecomment-485785126","issue_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/458","id":485785126,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NTc4NTEyNg==","user":{"login":"sangwinc","id":781615,"node_id":"MDQ6VXNlcjc4MTYxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/781615?v=4","gravatar_id":"","url":"https://api.github.com/users/sangwinc","html_url":"https://github.com/sangwinc","followers_url":"https://api.github.com/users/sangwinc/followers","following_url":"https://api.github.com/users/sangwinc/following{/other_user}","gists_url":"https://api.github.com/users/sangwinc/gists{/gist_id}","starred_url":"https://api.github.com/users/sangwinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangwinc/subscriptions","organizations_url":"https://api.github.com/users/sangwinc/orgs","repos_url":"https://api.github.com/users/sangwinc/repos","events_url":"https://api.github.com/users/sangwinc/events{/privacy}","received_events_url":"https://api.github.com/users/sangwinc/received_events","type":"User","site_admin":false},"created_at":"2019-04-23T12:38:55Z","updated_at":"2019-04-23T12:38:55Z","author_association":"MEMBER","body":"Thank you very much for explaining this.  It is probably not going to affect lots of people, but we should know about it.  PHP 5.6 is also out of support, and it looks like PHP 5.5 support stopped in 2016 (https://en.wikipedia.org/wiki/PHP#PHP_5).  So, I think it is reasonable to require PHP at least 5.6 from this point on for STACK.  I'll make that clear in the docs....\r\n\r\nChris\r\n"}}
{"actor":{"display_login":"sangwinc"}}