So the real issue of this bug remains: we need to define a usable mechanism to set attribute values on an inline shape that works with layer classification and labelling.
Once something is in place for SWIG MapScript please update ticket #2161 so that we port the same thing to PHP MapScript.