Home Blog

Fix WordPress Error – Depreciated Error Required parameter follows optional parameter in WordPress and PHP Script


At this time When I am writing this post, we have PHP 8 as the latest version of PHP and WordPress 5.8 as the latest version of WordPress.

After these releases of PHP 8 and WordPress 5.8, many WordPress users approached us mentioning a new WordPress error that is
“Deprecated: required parameter $variable follows optional parameter $variable in any File on any line”.

Just by reading the error, we were sure that this was about PHP and finally, we confirmed that if they had updated PHP Version. The answer was Yes, they all updated to PHP 8.

In this blog, we will tell you how you can fix this deprecated error and also how you can avoid deprecated errors in the future. We will try to keep it as simple as possible so that users from a non-developer background can also fix their websites and scripts.

Reason for error that is Deprecated: required parameter $variable follows optional parameter $variable

The first thing we found was that all WordPress users had updated to PHP 8.

Themes developers didn’t release the update for themes to be compatible with PHP 8 and users were too excited to move on to PHP 8.

So users updated to PHP 8 without checking the compatibility of their WordPress themes with PHP 8.

Users updated to PHP 8 but the theme code wasn’t updated in accordance with PHP 8 which triggered this error. So this was the reason for this WordPress error in simple terms.

In technical terms, we have an update in PHP 8 that the required parameter should be before the optional parameter. This wasn’t an issue in earlier versions of PHP.

This declaration can be anywhere in PHP Scripts, in WordPress Plugins, or in any WordPress Theme File. So if you have any function where Required Parameter is declared after Optional Parameter then you will see this deprecated error but only if you have PHP 8, earlier versions of PHP don’t trigger ṭhis error.

The solution to “Deprecated: required $parameter follows optional $parameter”

For those WordPress users who don’t know PHP and are not developers switch back to PHP 7.4 / Change PHP Version using cPanel or control panel whatsoever you have. Moving back from PHP 8 would fix this issue.

Those who are from the developer background and practice in PHP can watch this video.

If you are seeing this error that clearly means you have any or some functions in which you have declared an optional parameter before the required one.

Example The From Video:- We are seeing an Error stating “Deprecated: required parameter $width follows optional parameter $attach_id in …….path of the file….. line …”.

From the statement itself, You can see the required parameter is $width and the optional parameter is $attach_id.

We log in to the cPanel to access the file in accordance with the path specified in the error we see on the screen. Checked the line specified in the error and confirmed the same in that function.

Now we had 2 choices either we switch back to PHP 7.4 which was on the safer side and another was to make corrections in the function/declaration itself.

So here is the first code which triggered the error:-

function ct_resize($attach_id = null, $width, $height, $img_url = null, $crop = false )

Here is what we updated

function ct_resize($width, $height, $attach_id = null, $img_url = null, $crop = false ) 

In the 1st code above, you can clearly see we have $Null declared before Variables $width and $height.

In the updated code, we have replaced $attach_null, by placing it after $width and $height.

This fixed the error. Then we checked the website completely to see if any other warning or error is triggered with the change.

This is really important that if you make changes in PHP Scripts then you should always check out that everything is working.

Fortunately, we were able to fix this by updating the code. This error was not a major one and also we were aware of the update.

One more point is that it was only in one file. But if you see it on multiple files in multiple lines then I would recommend you not to change the code. Switching the PHP version to before PHP 8 would be better in that case.

The moral of the blog is that never change the PHP version unnecessarily without checking the compatibility of the theme and plug-ins. In WordPress compatibility is one of the factors which you have to consider before updating anything. If you miss out on anything related to compatibility then it can be an issue.

We hope this article will help you!

Is it worth buying Godox SK400ii Studio Flash Strobe? Ultimate Review of Godox SK400ii Strobe


If you are looking for a professional and affordable studio strobe light then Yes, it’s worth buying Godox SK400ii Studio Flash Strobe. After reading this article, you will know everything about Godox SK400ii.

Over the past few years, Godox has managed to earn a good reputation for its flash units. Godox has manufactured some of the widely used and very popular flashes. At this time, they have a huge customer base who buy their flashes and they have a decent market share. The same reputation comes with SK400ii strobe as well.

A few days back, we required 2 studio strobes that were not too costly and offer good quality light with standard features. Then we decided to buy Godox SK400ii and we are really impressed with its performance. Initially, we bought these strobes because of their popularity, price, and of course for their brand value. Now after using SK400ii, we found that the SK400ii strobe was a perfect buy for us. Here we are sharing almost everything we know about Godox SK400ii strobe and this will help you decide, either you have to buy it or not.

Specifications of Godox SK400ii Studio Strobe

1. Model – GODOX SK400ii
2. Maximum Power – 400Ws
3. Modeling Lamp – 150Ws in Yellow Color
4. Color Temperature – 5600+_200k
5. Recycle Time – 0.1 to 1s
6. Operating Voltage – AC 220V-240V
7. Triggering Mode – Slave Mode, Sync Cord, Wireless Triggering, Test Mode
8. Flash durations – 1/800s – 1/2000s
9. Guide No. – 65
10. Warranty – 1Year (except flash tube and modeling lamp)

Build quality and pricing of Godox SK400ii strobe

While using SK400ii strobes, we like the build quality and actually, it’s impressive in its price range that is around 140$ per unit.

The price of SK400ii is highly competitive to many other strobes of different brands that offer almost the same features.

Godox Sk400ii weighs around 2.1kg / 5lbs, which is obviously not too heavy. Its head comes with a tilting stand mount and sits nicely on the light stand. Godox Sk400ii has metal alloy thread on the mounting part.

Godox SK400ii is a manual strobe means it’s not a constant light. It features a 400Ws light source that is going to be operated on AC power. Godox SK400ii also features a 150Ws modeling lamp that is yellow, not white in color.

Godox SK400ii is a manual strobe, so no built-in TTL support is given. As well if you want to use the HSS feature then make sure to use a compatible wireless trigger. Like Godox SK400ii comes with Godox XT16 trigger and you can sync at speeds up to 1/250 second only using this trigger. This is the limitation of the trigger not of the light. Godox SK400ii features 1/800s – 1/2000s flash durations, so using a wireless trigger like Godox Xpro you can have sync speed up to 1/2000s.

Godox SK400ii comes with a standard Godox reflector out of the box but sometimes sellers may remove that, so make sure to check the details before buying it online.

Godox SK400ii has a decent-sized bright LCD panel on the backside. All buttons, a dialler, and an AC power socket are placed on the backside around and below the LCD. The on and off switch is also placed on the backside. So basically all physical controls are on the backside of the strobe.

The overall build quality of Godox SK400ii is going to impress you if you will consider its pricing. It’s built using decent quality metal alloy as well as plastic in some parts. It feels and looks professional, has decent weight, and is assembled with perfection.

Light quality of Godox SK400ii strobe light

Quality of light produced by godox SK400ii is per standards and it offers constant good quality of light. The quality of light from SK400ii is perfect and we got no issue with that. The Colour or the temperature of light didn’t change even when we used it continuously for a longer period of time.

Godox SK400ii is a 400Ws maximum output and 5600k daylight-balanced flash light source. It has a guide no. of 65 (m ISO 100). The output power of the strobe can be adjusted in 40 steps from 1/16(min. power) to 1(max. power).

The 150Ws Modeling Lamp (yellow color) can be adjusted in 5% to 100% power and has three modes to use is off, prop, and percentage.

Godox SK400ii has a recycling time of 0.1-1s which is impressive in its price range. The company claims that no more than 2% shifts when under the same output.

Godox SK400ii strobe also offers HSS support but capped up to 1/2000s. Make sure to buy compatible triggers for HSS support like Godox Xpro Trigger. We have tested Godox Xpro Trigger with it and its works perfectly with SK400ii. Using Godox Xpro with SK400ii, you can use trigger’s TTL and get HSS support from strobe as well.

Triggering System on Godox SK400ii Studio Flash Strobe

Godox SK400ii comes with a built-in 2.4Ghz wireless receiver. You can trigger SK400ii using a wireless flash trigger or using another flash. Godox SK400ii sync flawlessly with Canon, Nikon, Sony, and other systems using compatible wireless triggers based on different Camera bodies and their brands.

GODOX SK400ii offers three main triggering systems:-

The first one is, you can use SK400ii in slave mode (that is S1 and S2), so it can be triggered using another flash.

The second one is, sync cord triggering, and of course, the third one is wireless triggering using 2.4Ghz wireless triggers.

Some online sellers are selling SK400ii with XT-16 Wireless Flash Trigger which will allow you to trigger the flash but doesn’t offer TTL because this trigger doesn’t come up with built-in TTL. Also, XT-16 doesn’t offer to utilize HSS 1/2000s.

Triggers that can be used with Godox SK400ii

Godox Xpro TTL and Godox X1 are fully compatible popular wireless triggers that we can suggest to be used with SK400ii Strobe. These will allow you to use SK400ii with its full capabilities.

If you are not an expert then take advice from someone familiar with these systems before choosing any wireless trigger.

Godox SK400ii Strobe ease of use

Godox SK400ii Strobe is quite easy to use and easy to set up. It comes with Bowens-mount so attaching accessories like softboxes and other light modifiers are quite handy. Weight is decent and can be moved easily inside the studio.

The interface for using Godox SK400ii is on the backside like many other strobes. There is a decent size output LCD panel which is bright and clear. It shows you the settings which you have selected and helps you in making your output settings.

There are 5 buttons, one dialler, one strobe’s power on/off switch, one sync cord jack, one wireless control port, an AC power socket, and a fuse jack on the backside of GODOX SK400ii.

You can handle every function of GODOX SK400ii strobe from these buttons and that dialler.

There is a single button to set up both groups and channels. Short pressing GR/Ch button will allow you to select from groups and the long press will allow you to select from channels. Once you are in either Group or channel selection mode, you can use dialler to make the selection and then press the dialler itself to set it up on the selected value.

There is a slave mode button, a test button, and a button to adjust the power of the modeling lamp.

Use the dialler on SK400ii to adjust the power of the strobe flash.

That’s how the Godox SK400ii strobe is easy to operate. We find it quite handy to use and believe that even beginners will easily operate it once they get their hands on it.

Our Final Words for Godox SK400ii Studio Flash Strobe

At this time when we are publishing this article, in our view, the Godox SK400ii studio strobe is one of the most affordable, versatile, and professional studio flash strobes for professional photographers. Features and excellent versatility offered by Godox SK400ii studio strobe have already made it a popular choice in the photography community. You will only get positive reviews about the Godox SK400ii strobe.

SK400ii Studio Flash Strobe gives accurate color temperature and fast recycling time and offers all the features of an entry-level studio strobe. Godox SK400ii can be used for portraits, products, and food photography very efficiently.

In my opinion, if you know how to use and modify the light of a strobe then you can use it almost for anything inside your studio. Once you will start using this light, it is going to be your daily driver in the studio. Remember you are paying for 400Ws, not for 1000Ws, so don’t expect that it will replace your 1000Ws strobe.

In my opinion, Godox SK400ii strobe is the best 400Ws studio strobe out there in the market only at 140$ approx.

So, either you are a professional photographer or just starting your career and need to buy a decent size quality professional studio strobe then you can buy SK400ii studio flash strobe. It’s one of the best studio strobes which you can buy without giving extra thought.

FAQ about Godox SK400ii Studio Strobe