board3 / Board3-Portal

Adds a portal with several blocks, which can be switched on and off via the ACP, to the front page of your phpBB 3 forums.
http://www.board3.de
GNU General Public License v2.0
30 stars 21 forks source link

custom block #711

Closed Prosk8er closed 3 years ago

Prosk8er commented 5 years ago

if you make a custom block in acp then go to edit it you get this [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 789: A non-numeric value encountered [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 790: A non-numeric value encountered [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 791: A non-numeric value encountered php version 7.1 phpbb 3.2.5 portal version latest github version

block does work though and can be edited error is only displayed in acp when editing the custom block

Galixte commented 4 years ago

Hi @Prosk8er,

did you compare with the @Sajaki version available here: https://github.com/Sajaki/Board3-Portal?

From my side I encounter this issue: https://www.phpbb.com/customise/db/extension/board3_portal_ext/support/topic/199346.

MixingOnBeat commented 4 years ago

Not only does it affect the Custom Block, but also the Welcome Message block as well. It seems to trigger it if the block has a text box.

Could it be a PHP 7 issue?

Galixte commented 4 years ago

@Prosk8er @MixingOnBeat I found this, maybe: https://github.com/Sajaki/Board3-Portal/pull/3/files

MixingOnBeat commented 4 years ago

@Galixte -- thanks, that code update fixed the issue on my portal for the custom.php file.

Plus I had to apply the same (similar) code changes to LINE: 222 on the welcome.php file:

FIND: $welcome_message = generate_text_for_edit($portal_config['board3_welcome_message_' . $module_id], $this->config['board3_welcome_message_uid_' . $module_id], '');

REPLACE WITH: $welcome_message = generate_text_for_edit($portal_config['board3_welcome_message_' . $module_id], $this->config['board3_welcome_message_uid_' . $module_id], 0);

HDValentin commented 4 years ago

Could we fix this issue here in the code?

Galixte commented 4 years ago

Could we fix this issue here in the code?

You can submit un Pull Request.

HDValentin commented 4 years ago

I could copy and paste it. but I am unsure if I do it the right way.

marc1706 commented 3 years ago

Fixed in latest master.