diff --git a/django/core/paginator.py b/django/core/paginator.py
index 495cdf2..27051e9 100644
a
|
b
|
class EmptyPage(InvalidPage):
|
12 | 12 | class Paginator(object): |
13 | 13 | def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): |
14 | 14 | self.object_list = object_list |
15 | | self.per_page = per_page |
16 | | self.orphans = orphans |
| 15 | self.per_page = int(per_page) |
| 16 | self.orphans = int(orphans) |
17 | 17 | self.allow_empty_first_page = allow_empty_first_page |
18 | 18 | self._num_pages = self._count = None |
19 | 19 | |
diff --git a/tests/regressiontests/pagination_regress/tests.py b/tests/regressiontests/pagination_regress/tests.py
index 28fe316..dd6210e 100644
a
|
b
|
class PaginatorTests(TestCase):
|
85 | 85 | (([1, 2], 1, 1, True), (2, 1, [1])), |
86 | 86 | (([1, 2, 3], 2, 1, True), (3, 1, [1])), |
87 | 87 | ((eleven, 10, 1, True), (11, 1, [1])), |
| 88 | # Non-integer inputs |
| 89 | ((ten, '4', 1, False), (10, 3, [1, 2, 3])), |
| 90 | ((ten, u'4', 1, False), (10, 3, [1, 2, 3])), |
| 91 | ((ten, 4, '1', False), (10, 3, [1, 2, 3])), |
| 92 | ((ten, 4, u'1', False), (10, 3, [1, 2, 3])), |
88 | 93 | ) |
89 | 94 | for params, output in tests: |
90 | 95 | self.check_paginator(params, output) |