We report the effect of disorder on superconducting phase transition of YBa2Cu3O7−x epitaxial thin films in external magnetic fields. The disorder was produced by several successive acts of oxygen ion implantation. Controlling a total accumulated dose of implanted ions nD, we carried out transport measurements in ab-plane for temperatures T below 91 K and external magnetic fields H up to 11 T. Temperature-field dependencies of in-plane resistivity allow us to analyze H−T phase diagrams for primary compound as well as for disordered structure. Considering the upper critical field Hc2 as the magnetic field which corresponds to a local resistivity drop at the onset of superconducting transition, we found out the following results. By gradual increasing of nD, the phase-transition line Hc2(T) suffers an unconventional critical-field slope reduction, while larger defect concentrations usually enhance the upper critical field in the vicinity of Tc0. Besides, for rather large nD, the curvature of Hc2(T) becomes upward for temperatures close to Tc0. Theoretical interpretation of the experimental data is developed in the framework of linearized Ginzburg-Landau theory with an inhomogeneous superconducting coherence length. A simple expression for the critical temperature Tc is obtained: Tc=Tc0(1−h+αh3/2), where h is the dimensionless magnetic field and α is a constant which describes the defects in a specimen. The formula nicely fits our experimental results.