Developer Error Log

11 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 2, 2018   (RSS)

By leo - June 27, 2018

Hi Greg,

Change maxRecords to 0 should fix the error.

Thanks,

Leo - PHP Programmer (in training)
interactivetools.com

By gversion - June 27, 2018

Thanks, Leo - sounds simple enough. Are you sure that won't stop users posting any listings at all?!

Regards,

Greg

By leo - June 27, 2018

Hi Greg,

Sorry I didn't realize it's generated by the website membership plugin. In that case, can you try setting it to be null?

Let me know if it works.

Thanks,

Leo - PHP Programmer (in training)
interactivetools.com

By gversion - June 28, 2018

Hi Leo,

I tried setting it as follows:

'maxRecords'   => NULL, 

But this resulted in an error:

MySQL Error: Incorrect integer value: '' for column 'maxRecords' at row 1 - in register.php on line 79 by mysql_insert()

Thanks,

Greg

By leo - June 28, 2018 - edited: June 28, 2018

Hi Greg,

Can you try Changing the mysql_insert to:

mysql_insert('_accesslist', array(
 ...
 'maxRecords' => '',
 ...
), true);

Let me know if you are still getting errors!

Leo - PHP Programmer (in training)
interactivetools.com

By gversion - June 28, 2018

Hi Leo,

Just checking - should maxRecord in your last message be singular?

What does the "true" value do?

Thanks,

Greg

By leo - June 28, 2018

Hi Greg,

No it's a typo. It should be maxRecords.

The "true" disables sql strict mode temporarily so that integer fields takes empty value as valid input.

Leo - PHP Programmer (in training)
interactivetools.com

By gversion - June 28, 2018

Hi Leo,

Thank you very much for the help - that seems to have stopped the error messages.

Is this just a temporary fix? Can it be resolved without this workaround? Does this introduce any potential security concerns?

Thanks again for the support.

Regards,

Greg

By leo - June 29, 2018

Hi Greg,

It's not a temporary fix, you have some other options to resolve it but this is the best and fastest way to solve it. There are no significant security concerns as far as I know. To know more about sql strict mode you can check it here: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict

Thanks,

Leo - PHP Programmer (in training)
interactivetools.com