joomla getting notices when try to run my project - php

When I am trying to run my joomla project it give me list of notice with some warning.
Notice: Array to string conversion in /var/www/html/gms/libraries/framework/Joomla/Registry/Registry.php on line 419
Notice: Array to string conversion in /var/www/html/gms/libraries/framework/Joomla/Registry/Registry.php on line 421
Notice: Array to string conversion in /var/www/html/gms/libraries/framework/Joomla/Registry/Registry.php on line 424
Notice: Array to string conversion in /var/www/html/gms/libraries/framework/Joomla/Registry/Registry.php on line 428
Dont't know how to solve it

Related

Wordpress fatal error when editing post and using accent/non english letters

I updated w wordpress blog site to 6.0.1 and everything is okay except the post editing page doesn't load in (fatal error), when I use non english letters like "á".
If I create a new post and I write the content to "a" it is good.
Then if I change it to "á" it is bad.
If I deactivate the block editor in the user profile and I create a new post and I write "a" it is good.
If I then change it to "á" it is good.
Something is bad with the block editor.
The character coding of the tables and columns are utf8mb4_unicode_ci.
The php version is 7.4.
The MySQL version is 5.5.5-10.5.15-MariaDB.
Things I have tried:
deactivated every plugin
changed themes to twntytwentytwo
Notice:
Trying to access array offset on value of type null in blog/wp-content/plugins/wp-hide-post/admin/settings/class_settings.php
on line 324
Notice:
Undefined offset: 0 in blog/wp-includes/class-wp-block.php
on line 224
Notice:
Trying to get property 'parsed_block' of non-object in blog/wp-includes/class-wp-block.php
on line 228
Notice:
Trying to access array offset on value of type null in blog/wp-includes/block-supports/elements.php
on line 100
Notice:
Trying to get property 'parsed_block' of non-object in blog/wp-includes/class-wp-block.php
on line 233
Notice:
Trying to get property 'parsed_block' of non-object in blog/wp-includes/class-wp-block.php
on line 236
Notice:
Trying to access array offset on value of type null in blog/wp-includes/blocks/gallery.php
on line 20
Notice:
Trying to access array offset on value of type null in blog/wp-includes/blocks/latest-posts.php
on line 234
Notice:
Trying to access array offset on value of type null in blog/wp-includes/blocks/navigation.php
on line 666
Warning:
Creating default object from empty value in blog/wp-includes/class-wp-block.php
on line 236
Notice:
Undefined property: stdClass::$context in blog/wp-includes/class-wp-block.php
on line 239
Fatal error: Uncaught Error: Call to undefined method stdClass::render() in blog/wp-includes/class-wp-block.php:241
Stack trace:
#0 blog/wp-includes/blocks.php(901): WP_Block->render()
#1 blog/wp-includes/blocks.php(939): render_block(Array)
#2 blog/wp-includes/class-wp-hook.php(307): do_blocks('

why have I an error in the visual constructor?

I have an error notice in the visual constructor of my web page (jupiter)
That error says:
Warning: Illegal string offset 'pro_widgets' in /home/customer/www/gedysa.com/public_html/wp-content/plugins/elementor/includes/api.php on line 164
Warning: Illegal string offset 'pro_widgets' in /home/customer/www/gedysa.com/public_html/wp-content/plugins/elementor/includes/api.php on line 167
I have gone where apparently the problem is, in the php archive of jupiter plugin and it look like this:
164 $data['pro_widgets'] = [];
165 }
166
167 return $data['pro_widgets'];
but I dont know what to do.
Could somebody help me??

PHP disable error from specific file?

I am getting hundreds of from ANSI.php. Here is an example:
/usr/share/pear/File/ANSI.php on line 553 Notice: Undefined offset: 75 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Undefined offset: 76 in
/usr/share/pear/File/ANSI.php on line 553 Notice: Undefined offset: 76 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Undefined offset: 77 in
/usr/share/pear/File/ANSI.php on line 555 Notice: Trying to get property of non-object in
/usr/share/pear/File/ANSI.php on line 496 Notice: Trying to get property of non-object in
This is generating from:
$ansi->appendString($ssh->read());
Everything is working. I suspect the old machines I am working with are giving ANSI.php a hard time.
Is there a way i can disable just the error messages from ANSI.PHP and keep the others? Unless someone has a way of fixing the error.
Simplest Solution (Sub-Optimal)
I guess the simplest way to suppress the errors would be to use the error suppression operator #. eg.
#$ansi->appendString($str);
Optimal Solution (Possibly)
There have been two commits to phpseclib since the latest release (1.0.7 and 2.0.6, as of this post) that fixed issues with File/ANSI.php:
https://github.com/phpseclib/phpseclib/commit/5c792f6bc1fa8a5d26b43fb8200191c073637e15
https://github.com/phpseclib/phpseclib/commit/84d1628cb7734134b1ba80545b38985025942b79
More info:
https://github.com/phpseclib/phpseclib/issues/1161
https://github.com/phpseclib/phpseclib/issues/1150
Kinda makes me wonder if one of those might fix the issue for you.
Fallback to Optimal Solution
If the previously mentioned "optimal solution" doesn't fix the issue for you then it would be nice to fix the problem at the source. What'd help me do that would be a copy of the data you got before you passed it to $ansi->appendString(). To make it so the characters don't get garbled because they're extended ASCII maybe hex encode it. eg. echo bin2hex($ssh->read()); or something.

Socket io communicate php

I need communicate php to NodeJs (Socket.io) Server. I find i library about it. But i can't recieve data. The library name is Elephant.io. There is some way to communicate Php and Socket.io ? I need it.
I need Send data and Recieve data.
This is my Library ->
https://github.com/Wisembly/elephant.io
But it doesn't work.
This is my code block and i get this error ;
$client = new Client(new Version1X('http://192.168.1.4:150/'));
$client->initialize();
while(true)
{
$r=$client->read();
if (!empty($r)) {
echo $r;
}
}
$client->close;
This is Cmd error;
PHP Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 122
Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 122
PHP Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 123
Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 123
PHP Notice: Uninitialized string offset: 1 in C:\xampp\htdocs\SocketClientExample\src\Payload\Decoder.php on line 95
Notice: Uninitialized string offset: 1 in C:\xampp\htdocs\SocketClientExample\src\Payload\Decoder.php on line 95
I want to another Library for it. Do have anyone know something about it ?

PHP Notice: Undefined offset: 0, 1, 2,3 in same line

I am getting this PHP error:
Notice: Undefined offset: 0 in D:\MYBLOG\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\MYBLOG\admin\library\engines\typography-engine.php on line 32
Notice: Undefined offset: 1 in D:\MYBLOG\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-content\themes\MYBLOG\admin\library\engines\typography-engine.php on line 32
Here is the PHP code that throws it:
/* Check stored against current to make sure we don't display deleted css */
if(is_array($custom_fonts)):
foreach($custom_fonts as $id => $font):
if(!$current_custom[$id])unset($custom_fonts[$id]);
endforeach;
endif;
$css = '';
LINE 32 IS HERE:
if(!$current_custom[$id])unset($custom_fonts[$id]);
What does this error mean? What causes this error?
Is there a quick fix to resolve these error?
Really appreciate for any help
Thank you
Replace the 32 line with this:
if(empty($current_custom[$id]) || !$current_custom[$id])unset($custom_fonts[$id]);
There is not a real problem, only a notice (=advice, not error, not warning) which tells you that the $id does not actually exists in the $current_custom array. As the coded tries to unsed the $current_custom[$id] if it is evaluated as false (null, zero, empty string, ...) it is just fine.

Categories