I create websites, applications and e-commerce solutions at Unleashed Technologies. When I'm not solving tough problems for clients or working on open-source projects, you can find me speaking at conferences all around the world. In my free time, I also like to tinker with Arduino and home automation.
Magento has just released the SUPEE-10415 security patch for the following versions:
- Magento Commerce 18.104.22.168-22.214.171.124 (formerly known as Enterprise Edition)
- Magento Open Source 126.96.36.199-188.8.131.52 (formerly known as Community Edition)
The patch contains fixed for several security vulnerabilities including cross-site request forgery (CSRF), Denial-of-Service (DoS), and authenticated Admin user remote code execution (RCE).
I recently came across this really helpful PHP trick:
You can cast a numeric string to either
float, depending on its contents, by simply adding
var_dump("1" + 0); // int(1) var_dump("1." + 0); // float(1) var_dump("1.0" + 0); // float(1) var_dump("1.5" + 0); // float(1.5)
That's much cleaner than trying to make a conditional cast yourself: