Inconsistent variable name in the 2.2.x docs

Fixes a trivial error in a couple of the code samples in the docs.