fuel/orm — Issue #127: Possible undefined index in Observer_Slug
Author: tabacco
Created: 2011-12-18 00:03:46+00:00
State: open

In the expression on line 61, the only match is optional, so preg_match() can return 1 and cause execution to enter the if statement even if there's no index trailing the slug.

If this happens, $matches[1] isn't set on line 64, triggering an E_NOTICE.

My cheap fix is to replace line 64 with ```$index = isset($matches[1]) ? (int)$matches[1] : 0;```