Problem/Motivation
Some modules like ctools(custom pages) send menu array which contains "weight" column as "string" and thus a PDO is thrown as below :1366 Incorrect integer value: '' for column 'weight' at row 19: INSERT INTO {menu_router}
Proposed resolution
Cast the value to an integer as per attached patch.
Remaining tasks
Cast other items as needed i.e., checking for NULL values before executing insert statement.
User interface changes
Nonde
API changes
None
Data model changes
None