PHP Notice:  Trying to get property of non-object in /app/cottenio/core.php on line 1175

PHP is like a kindly old aunt who doesn’t like to correct the young’ins even though she knows they’ve done wrong.

In her head, she’s saying “Oh, so-and-so, that’s so cute,” while in her head she’s sadly contemplating the genetic lottery that led someone to try to fetch an object property from a variable that isn’t an object at all.

So when you see this error in your code just know you’ve either made terribly incorrect assumptions about your incoming data, or that you’re accessing an object…

PHP Deprecated:  Function set_magic_quotes_runtime() is deprecated in /app/oldapp/etc/class.phpmailer.php on line 1091

Do you believe in ghosts?

Because PHP has ghosts. Terrible specters that haunt the darkest corners of your clients’ legacy projects, just waiting… quietly, patiently, for you to do something reasonable like trying to upgrade the project to a newer version of PHP.

And then?


All because what was once deprecated is now dead.

And of all my favorite deprecated functions to run into when evaluating old projects for a conversion to the newest version of PHP, there’s nothing quite like “magic quotes.”

A Terrible Idea

Magic quotes were a…

PHP Notice:  Undefined index: reciept_email in /opt/cottenio/core.php on line 331

There are many errors in PHP that are like siblings: undefined variable, undefined property, and undefined index for instance — and they all range in severity based on circumstance. Some are like the quiet wallflowers at the school dance nobody notices, while others are deadly killers just waiting to ambush your unsuspecting users.

Whereas the undefined variable error is fairly fast to diagnose (seek out the line reported and see if its simply misspelled or never initialized), the undefined index error might require a deep dive into an entire chain…

PHP Notice:  Undefined variable: inactive_sohps in /app/cottenio/core.php on line 567

PHP is extremely permissive about undefined variables, unlike static typed languages like C.

So permissive, in fact, that an undefined variable isn’t classed at the level of Error or Warning, but of Notice instead.


Because an undefined variable in PHP is temporarily replaced with its default value if it hasn’t been assigned yet¹.

How Undefined Variables Work

First, how do we prove that the PHP interpreter only does a temporary replacement? How do we know it doesn’t initialize the variable with its default value after its first encounter with it?

The code…

Following the Digital Trail of the CryptoForHealth Scammers

The infamous hacking of high-profile Twitter accounts on July 15th, 2020 yielded a group of crypto-scammers over $117,000 worth of Bitcoin in a few short hours. Join us on the trail to find out where the money came from and where it’s going, along with a few clues that may give authorities a means to track down the cyber-criminals, including an analysis of the indictments of

(This article is being updated as new information about the hackers becomes available.)

No, Elon Musk is NOT Giving Away Free Bitcoin

Twitter got hacked: big time.

And — thank our lucky stars — rather than start a nuclear war or crash the…

Identifying Click Fraud and Broken UTM Strings in Apache Logs

An article covering the many issues that may occur when utilizing manual tagging of UTM parameters in SEM advertising campaigns; their discovery and cataloging with Python. Presents case examples of a merchant managing their own advertising platforms and utilizing UTM parameters to determine the customers’ experience (discounts, shipping options, etc).

If you’re already familiar with how UTM parameters, manual tagging, and Google/Bing ad platforms work just skip down about halfway to see the Python code build-out.

Photo by Pixabay from Pexels

“Something is wrong with my ad-spend.”

Terrifying words. Expensive words.


Or, in this example: Bing Ads.

The Scenario

A client has an e-commerce website that…

A Python Adventure in AWS (Feat. API Gateway)

Photo by Christina Morillo from Pexels

Today I was working on my 2020 plan to turn things into AWS Lambdas.

Better put: hopefully only the things I should turn into Lambdas. You know, the sorts of things that don’t really need a cloud server sitting around being billed by the hour when a microservice could handle the job on-demand.

The particular feature stack I was working on involved relying on a custom Region service that could look up US/Canadian postalcodes and provide a variety of information about them: alternate city names, latitude/longitude — you get the idea.

Our own custom data is glommed onto the standard…

Photo by Tomasz Filipek from Pexels

A Video Game Limerick (Or What Happens When…

A Simple Lesson About Sincerity by Confucius

Photo by ELEVATE from Pexels

The philosophies of Confucius may seem daunting at first, and yet his words are so simple and easy to understand that it’s no wonder he’s considered one of the greatest Teachers of all time.

When viewed through the lens of morality, where one should seek self-improvement and finding your proper place in society, it becomes far easier to understand his lessons.

The Analects, a collection of his sayings and teachings, covers almost every topic under the sun: from duty to family and country to the role of mass-education in uplifting the fortunes of the people.

And within the Ji Shi…

Rain Through a Windshield (Tim Cotten)

A Lannet Sonnet of Captured Stillness

Tim Cotten

An enthusiast about most things technical and natural. <> @cottenio

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store