array_unshift() expects parameter 1 to be array, null given
-
Warning in debug.log.
array_unshift() expects parameter 1 to be array, null given
Type: PHP Warning
Line: 135
File: /home/wp-content/plugins/wp-external-links/includes/admin/class-wpel-settings-page.phpThanks
-
@dimalifragis where did you catch this? Can You provide the exact steps to reproduce it?
Hello.
This is showing in my debug.log, i have no idea when it happens.
I’m using WP 5.3.4 and PHP 7.2.x
I have been using your plugin for months now, no problems. This is new for some reason.
@dimalifragis is this causing some sort of issue on your solution?
No, i do not see any problem in the links. Seems to work fine.
@dimalifragis, great. Anyway, I’m going to inform our dev team about this so they can take a look and send a possible fix at the next release.
Hi, I am getting the same error message in the admin of a test site I am working on … not noticed it on other sites !
Warnings only shown when I visit the Add Plugins page … its repeated 4 times in my case :
Warning: array_unshift() expects parameter 1 to be array, null given in <URLeditedForSecurity>/spark/wp-content/plugins/wp-external-links/includes/admin/class-wpel-settings-page.php on line 135
WP 5.4.2, PHP 7.2.31
I see that the install dir in @dimalifragis isuue is possibly in a sub-dir /home/.
Mine is also in a sub dir. could it be happening only if WP is installed in a sub-dir ?Plugin seems to work OK … just get this warning !?!
Best
ChrisThanks for the report, so i don’t feel alone 🙂
My WP is not in a subdirectory. Just FYI. Home is a directory in the root of my hosting space (like public_html etc etc).
shame… hoped that might be a pointer to a solution. ah well.
its more of an anoyance than an a problem !
Chris@chrisbz @dimalifragis our team tried to solve the issue but couldn’t replicate on our side… Although, they tried to come to a solution. If you don’t mind please install this version and tell if the issue went away.
https://u.pcloud.link/publink/show?code=XZ2RsIkZphxuWNsRmTQd6j8qEPI5OX3Obh9X
Oh I see …
You are pushing WebFactory Ltd products onto the top of the Featured & therfore the Reccomended Plugins lists on the Add Plugins wp-admin page
I have to admit I always thought that that these lists were curated by ww.wp.xz.cn!
So it wont affect the running of the External Links plugin … just make the Add Plugin page look ugly for some people.
BTW: The new version didnt completely resolve the issue for me it just changed the error to:
Warning: array_merge(): Argument #2 is not an array in <dirEditedForSecurity> spark/wp-content/plugins/wp-external-links/includes/admin/class-wpel-settings-page.php on line 152
Chris
Same as the above posted.
The error seems to happen in admin dashboard, when uninstalling or installing a new plugin.
@dimalifragis @chrisbz I tried again and once again I cannot replicate.
Try this: https://u.pcloud.link/publink/show?code=XZkulIkZYMTDssAwqz846RPS3DqBDk1sC24y
I believe this one should do the job.
Hi, Yes that fixed the issue
ThanksHi
Bit late reporting this … but I was wrong and it didnt fix the issue.However I think I have foundd out what the problem was… (or I am talking rubish below!)
There was another plugin (WP User Manager) that had also created a public function called get_option_value
Once I disabled the WP User Manager the problem was resolved.
Just a suggestion: but perhaps if you prefix your public functions with a unique string it might help stop stop you bumping into other plugins e.g. wpel_get_option_value
I actually renamed the function in WP User Manager to wpum_get_option_value as there was only the function and 4 calls to it in one file (\wp-user-manager\vendor\htmlburger\carbon-fields\core\Field\Checkbox_Field.php) and reactivated it and both plugins work ok now ! … just testing not workable if change gets wiped on next update!
Any chance you can confirm this is the issue ? Thanks
Best
ChrisHi Chris,
Yea it’s really not good to put anything into the root namespace 🙁
I’ll see what we can do about this.
The topic ‘array_unshift() expects parameter 1 to be array, null given’ is closed to new replies.