SQL ERROR [ mysqli ]


no_avatar
Voice4Vision
 
Mensajes: 12
Registrado: Mar Abr 10, 2018 3:19 am
 Jue Jun 14, 2018 11:36 pm • a través de Web
I receive the following error on my portal page.

Código: Seleccionar todo
General Error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax check the manual that corresponds to your MariaDB server version for the right syntax to use near 'm trying to do is not join my ancestral spirits just yet.";s:6:"author";s:12:"Jo' at line 2 [1064]

SQL

UPDATE bbv4v_blockgets_blocks SET block_content = 'a:6:{s:7:"all_day";s:1:"1";s:4:"rand";s:1:"0";s:11:"show_author";s:1:"1";s:9:"last_time";i:1529018407;s:7:"last_id";i:1;s:4:"list";a:16:{i:0;a:2:{s:4:"text";s:99:"A man, as a general rule, owes very little to what he is born with, a man is what he makes himself.";s:6:"author";s:21:"Alexander Graham Bell";}i:1;a:2:{s:4:"text";s:219:"Nobody is stronger, nobody is weaker than someone who came back. There is nothing you can do to such a person because whatever you could do is less than what has already been done to him. We have already paid the price.";s:6:"author";s:11:"Elie Wiesel";}i:2;a:2:{s:4:"text";s:120:"In spite of everything that was done to me and my race, in spite of the adversity and the bitter moments, again we rise.";s:6:"author";s:12:"Maya Angelou";}i:3;a:2:{s:4:"text";s:38:"In a mad world, only the mad are sane.";s:6:"author";s:14:"Akiro Kurosawa";}i:4;a:2:{s:4:"text";s:59:"Peace is the one condition of survival in this nuclear age.";s:6:"author";s:15:"Adlai Stevenson";}i:5;a:2:{s:4:"text";s:63:"All I'm trying to do is not join my ancestral spirits just yet.";s:6:"author";s:12:"Joshua Nkomo";}i:6;a:2:{s:4:"text";s:115:"Hunger, love, pain, fear are some of those inner forces which rule the individual's instinct for self preservation.";s:6:"author";s:15:"Albert Einstein";}i:7;a:2:{s:4:"text";s:53:"If you live among wolves you have to act like a wolf.";s:6:"author";s:17:"Nikita Khrushchev";}i:8;a:2:{s:4:"text";s:82:"To survive it is often necessary to fight and to fight you have to dirty yourself.";s:6:"author";s:13:"George Orwell";}i:9;a:2:{s:4:"text";s:146:"Man can live about forty days without food, about three days without water, about eight minutes without air, but only for one second without hope.";s:6:"author";s:14:"Charles Darwin";}i:10;a:2:{s:4:"text";s:39:"Survival is nothing more than recovery.";s:6:"author";s:16:"Dianne Feinstein";}i:11;a:2:{s:4:"text";s:65:"The ability to delude yourself may be an important survival tool.";s:6:"author";s:11:"Jane Wagner";}i:12;a:2:{s:4:"text";s:168:"Through humor, you can soften some of the worst blows that life delivers. And once you find laughter, no matter how painful your situation might be, you can survive it.";s:6:"author";s:10:"Bill Cosby";}i:13;a:2:{s:4:"text";s:129:"In a world where change is inevitable and continuous, the need to achieve that change without violence is essential for survival.";s:6:"author";s:12:"Andrew Young";}i:14;a:2:{s:4:"text";s:54:"For Harmony. A chance at life. To fight on other days.";s:6:"author";s:12:"Janet Morris";}i:15;a:2:{s:4:"text";s:173:"The consciousness of being deemed dead, is next to the presumable unpleasantness of being so in reality. One feels like his own ghost unlawfully tenanting a defunct carcass.";s:6:"author";s:15:"Herman Melville";}}}' WHERE block_id = 16

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 994
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbbdbdriverdriver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbbdbdrivermysqli->sql_query()

FILE: [ROOT]/ext/canidev/blockgets/blocks/quote_of_day_block.php
LINE: 79
CALL: phpbbdbdriverfactory->sql_query()

FILE: [ROOT]/ext/canidev/blockgets/libraries/blockgets.php
LINE: 369
CALL: canidevblockgetsblocksquote_of_day_block->init()

FILE: [ROOT]/ext/canidev/blockgets/libraries/blockgets.php
LINE: 333
CALL: canidevblockgetslibrariesblockgets->block_to_template()

FILE: [ROOT]/ext/canidev/blockgets/libraries/blockgets.php
LINE: 208
CALL:canidevblockgetslibrariesblockgets->load_blocks()

FILE: [ROOT]/ext/canidev/blockgets/event/listener.php
LINE: 137
CALL: canidevblockgetslibrariesblockgets->display_page()

FILE: (not given by php)
LINE: (not given by php)
CALL: canidevblockgetseventlistener->on_footer()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 184
CALL: call_user_func()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 46
CALL: SymfonyComponentEventDispatcherEventDispatcher->doDispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 62
CALL: SymfonyComponentEventDispatcherEventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 46
CALL: phpbbeventdispatcher->dispatch()

FILE: [ROOT]/includes/functions.php
LINE: 4626
CALL: phpbbeventdispatcher->trigger_event()

FILE: [ROOT]/ext/canidev/blockgets/controller/main_controller.php
LINE: 78
CALL: page_footer()

FILE: [ROOT]/vendor/symfony/http-kernel/HttpKernel.php
LINE: 135
CALL: canidevblockgetscontrollermain_controller->display()

FILE: [ROOT]/vendor/symfony/http-kernel/HttpKernel.php
LINE: 57
CALL: SymfonyComponentHttpKernelHttpKernel->handleRaw()

FILE: [ROOT]/app.php
LINE: 35
CALL: SymfonyComponentHttpKernelHttpKernel->handle()


Any suggestion as to how I can fix this error?
Avatar de Usuario
IvanPF
Administrador
 
Mensajes: 2010
Registrado: Vie Jun 17, 2011 12:15 am
Ubicación: España (Spain)
 Vie Jun 15, 2018 1:54 pm • a través de Web
Hi,

Thanks for the report.
Download the fix attached to this message and upload it to the folder /ext/canidev/blockgets/blocks/

*Contenido privado*
no_avatar
Voice4Vision
 
Mensajes: 12
Registrado: Mar Abr 10, 2018 3:19 am
 Sab Jun 16, 2018 12:20 am • a través de Web
I applied the fix, however I am now displaying the following error.

Código: Seleccionar todo
[phpBB Debug] PHP Warning: in file [ROOT]/ext/canidev/blockgets/blocks/quote_of_day_block.php on line 128: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/ext/canidev/blockgets/blocks/quote_of_day_block.php on line 128: mt_rand(): max(-1) is smaller than min(0)
no_avatar
Voice4Vision
 
Mensajes: 12
Registrado: Mar Abr 10, 2018 3:19 am
 Sab Jun 16, 2018 1:48 am • a través de Web
SOLVED!
OPEN: folder /ext/canidev/blockgets/blocks/quote_of_day_block.php

FIND:
Código: Seleccionar todo
$new_id = mt_rand(0, (count($data['quotes'])-1));


AND REPLACE WITH:
Código: Seleccionar todo
$new_id = mt_rand(0, (count($data['list'])-1));
Avatar de Usuario
IvanPF
Administrador
 
Mensajes: 2010
Registrado: Vie Jun 17, 2011 12:15 am
Ubicación: España (Spain)
 Dom Jun 17, 2018 2:01 pm • a través de Web
Thanks for the report
Avatar de Usuario
Leinad4Mind
 
Mensajes: 213
Registrado: Jue Oct 15, 2015 10:10 pm
 Lun Jun 25, 2018 3:55 pm • a través de Web
This was already reported and the solution provided here: viewtopic.php?f=24&t=816

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados