There are callers that invoke this code without ever casting $articleId to int. This can potentially result in arbitrary strings getting included in the returned path. Danger, Will Robinson!