PHP
7 notes.
__debugInfo() does not hide anything from dd()
The card object in my Laravel package kept its number in a private property, masked it in __debugInfo(), and marked the constructor arguments #[SensitiveParameter]. dd() printed the full card number and CVN anyway, and so did var_export() and an (array) cast. The fix was to stop storing them on the object at all.
wp_update_post() eats your backslashes
Two WP-CLI scripts rewrote 78 posts on this site. 69 came back exactly as planned. The other 9 lost every literal backslash they had, including the string interpolation in two Swift tutorials, and nothing reported an error. wp_update_post() expects slashed input and unslashes whatever it is given.
wp cache flush doesn’t flush what your site is actually serving
Three times in one week I changed something on this site, verified the change, and watched the old version keep going out. Each time the change was correct. Each time a different cache was holding it, and the command I used to check was testing a layer that wasn't the problem.
How to Use msmtp with PHP’s mail() Function to Send Email
In this guide, let's explore how to set up PHP to use msmtp, a lightweight SMTP client, as its MTA.
PHP Error:0607A082:digital envelope routines:EVP_CI PHER_CTX_set_key_length:invalid key length
If you are trying to use an older version of PHP to connect MYSQL over SSL, there is a good chance that you encounter the following errors: error:0607A082:digital…
WordPress: Fix – Parameter 1 to fdl_the_content() expected to be a reference – error
Today, i moved my blog to a new server. Everything was set up easily. But, when i pulled out a blog post, everything was working correctly, except that…
Magento: Check if an admin is logged in or not
If you are writing a custom module, and you want it to be accessed only by admins, then you possibly need the following code in your controller. 9113923886ace2b8605975_000036