1
aerograf
Xoopspoll
  • 2017/5/8 16:31

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


The question concerns the voting of the guests.
He issued permits, but the guests can not vote.
Module: https://github.com/XoopsModules25x/xoopspoll
XOOPS 2.5.8.1
Where should I look?

2
aerograf
Re: Xoopspoll
  • 2017/5/9 11:21

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


File: class/poll.php
Approximately on line 124:
|| (XoopspollConstants :: ANONYMOUS_VOTING_ALLOWED === $ this-> getVar ('anonymous'))

Lead to the form:
|| (XoopspollConstants :: ANONYMOUS_VOTING_ALLOWED === (int) $ this-> getVar ('anonymous'))

Now there is a question about the voting with multiple choice.

3
aerograf
Re: Xoopspoll
  • 2017/5/9 11:35

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


And in the continuation ...
Questions on the module so far removed.
In the same file, about 156 lines:
&& ((XoopspollConstants :: MULTIPLE_SELECT_LIMITLESS === $ this-> getVar ('multilimit'))

replaced by:
&& ((XoopspollConstants :: MULTIPLE_SELECT_LIMITLESS === (int) $ this-> getVar ('multilimit'))

4
aerograf
Re: Xoopspoll
  • 2017/5/9 12:12

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


For blocks in the files block / multipoll.php and block / singlepoll.php the line:
If (XoopspollConstants :: MULTIPLE_SELECT_POLL === $ pollVars ['multiple']) {

Fix it for:
If (XoopspollConstants :: MULTIPLE_SELECT_POLL === (int) $ pollVars ['multiple']) {

5
zyspec
Re: Xoopspoll
  • 2017/5/9 22:25

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


You'll find the same issue in ./blocks/singlepoll.php around line 120
if (XoopspollConstants::MULTIPLE_SELECT_POLL === $pollVars['multiple']) {

should be:
if (XoopspollConstants::MULTIPLE_SELECT_POLL === (int) $pollVars['multiple']) {


These regressions were introduced in commit 8bf75c0 by introduction of exact (type) checking.

6
aerograf
Re: Xoopspoll
  • 2017/5/10 4:26

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Above is written the same.
Most likely, these errors pop up due to different versions of PHP. There is simply no other explanation ...

7
zyspec
Re: Xoopspoll
  • 2017/5/10 14:45

  • zyspec

  • Module Developer

  • Posts: 1093

  • Since: 2004/9/21


Sorry, I missed that you had included that one above...

just wanted to make sure you found them all.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

76 user(s) are online (42 user(s) are browsing Support Forums)


Members: 0


Guests: 76


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits